博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
《Linux 系列》- 常用命令- 系统命令
阅读量:6478 次
发布时间:2019-06-23

本文共 3683 字,大约阅读时间需要 12 分钟。

hot3.png

查看某个进程

ps -ef  :查看系统进程

[root@localhost ~]# ps -efUID        PID  PPID  C STIME TTY          TIME CMDroot         1     0  0 16:34 ?        00:00:01 /usr/lib/systemd/systemd --switcroot         2     0  0 16:34 ?        00:00:00 [kthreadd]root         3     2  0 16:34 ?        00:00:00 [ksoftirqd/0]root         5     2  0 16:34 ?        00:00:00 [kworker/0:0H]root         6     2  0 16:34 ?        00:00:00 [kworker/u128:0]root         7     2  0 16:34 ?        00:00:00 [migration/0]root         8     2  0 16:34 ?        00:00:00 [rcu_bh]root         9     2  0 16:34 ?        00:00:00 [rcuob/0]root        10     2  0 16:34 ?        00:00:00 [rcuob/1]root        11     2  0 16:34 ?        00:00:00 [rcuob/2]root        12     2  0 16:34 ?        00:00:00 [rcuob/3]root        13     2  0 16:34 ?        00:00:00 [rcuob/4]root        14     2  0 16:34 ?        00:00:00 [rcuob/5]root        15     2  0 16:34 ?        00:00:00 [rcuob/6]root        16     2  0 16:34 ?        00:00:00 [rcuob/7]

ps -ef|grep -i vim  :查看进程中 和 vim 相关的进程

[root@localhost ~]# ps -ef|grep -i vimroot      3324  3264  0 17:05 pts/0    00:00:00 vim initial-setup-ks.cfgroot      3356  3325  0 17:06 pts/1    00:00:00 grep --color=auto -i vim

杀死某个进程

第一步:找到需要操作的进程

[root@localhost ~]# ps -ef|grep -i vimroot      3420  3264  0 17:08 pts/0    00:00:00 vim initial-setup-ks.cfgroot      3430  3370  0 17:08 pts/1    00:00:00 grep --color=auto -i vim

第二步:根据pid,杀死相应进程

[root@localhost ~]# kill -9 3420[root@localhost ~]# ps -ef|grep -i vimroot      3432  3370  0 17:09 pts/1    00:00:00 grep --color=auto -i vim

查看网络配置

查看本机Ip地址

[root@localhost ~]# ifconfigeno16777736: flags=4163
mtu 1500 inet 192.168.63.133 netmask 255.255.255.0 broadcast 192.168.63.255 inet6 fe80::20c:29ff:feab:6121 prefixlen 64 scopeid 0x20
ether 00:0c:29:ab:61:21 txqueuelen 1000 (Ethernet) RX packets 1637 bytes 198255 (193.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1291 bytes 236145 (230.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73
mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 0 (Local Loopback) RX packets 6 bytes 560 (560.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 6 bytes 560 (560.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

测试目标的连通性

[root@localhost ~]# ping 192.168.63.133PING 192.168.63.133 (192.168.63.133) 56(84) bytes of data.64 bytes from 192.168.63.133: icmp_seq=1 ttl=64 time=0.033 ms64 bytes from 192.168.63.133: icmp_seq=2 ttl=64 time=0.045 ms64 bytes from 192.168.63.133: icmp_seq=3 ttl=64 time=0.048 ms64 bytes from 192.168.63.133: icmp_seq=4 ttl=64 time=0.045 ms64 bytes from 192.168.63.133: icmp_seq=5 ttl=64 time=0.044 ms64 bytes from 192.168.63.133: icmp_seq=6 ttl=64 time=0.044 ms64 bytes from 192.168.63.133: icmp_seq=7 ttl=64 time=0.046 ms64 bytes from 192.168.63.133: icmp_seq=8 ttl=64 time=0.056 ms64 bytes from 192.168.63.133: icmp_seq=9 ttl=64 time=0.043 ms64 bytes from 192.168.63.133: icmp_seq=10 ttl=64 time=0.083 ms64 bytes from 192.168.63.133: icmp_seq=11 ttl=64 time=0.049 ms64 bytes from 192.168.63.133: icmp_seq=12 ttl=64 time=0.044 ms64 bytes from 192.168.63.133: icmp_seq=13 ttl=64 time=0.044 ms64 bytes from 192.168.63.133: icmp_seq=14 ttl=64 time=0.044 ms^C--- 192.168.63.133 ping statistics ---14 packets transmitted, 14 received, 0% packet loss, time 13006msrtt min/avg/max/mdev = 0.033/0.047/0.083/0.013 ms

重启与关机

重启命令

reboot
关键命令
halt

转载于:https://my.oschina.net/kimisme/blog/1606878

你可能感兴趣的文章
python 快熟打开一个http下载服务
查看>>
Using Nini .NET Configuration Library
查看>>
面向对象的故事~数据底层操作告诉了我们接口,抽象类,继承与多态性的使用...
查看>>
蓝桥杯java高职组
查看>>
linux文件权限
查看>>
header的用法小结(转)
查看>>
解决 ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)异常
查看>>
读javascript高级程序设计12-HTML5脚本编程
查看>>
【转】支付宝的性能测试
查看>>
关于Struts2中的ognl-2.6.11.jar和ognl-2.7.3.jar解决思路
查看>>
如何矫正罗圈腿(O型腿)
查看>>
【Unity】11.4 车轮碰撞体(Wheel Collider)
查看>>
asp.mvc展示model
查看>>
自己动手写js分享插件(QQ空间,微信,新浪微博。。。)
查看>>
纯CSS实现JS效果研究
查看>>
深度解析开发项目之 01 - SVProgressHUD用法
查看>>
POJ3083Catch That Cow[BFS]
查看>>
ostream_iterator的可能实现
查看>>
maven配置src/resources默认目录
查看>>
Ubuntu16.04首次root登录设置
查看>>