rm 删除
rm 文件 删除文件
rm -rf 删除目录
-r 递归
-f force 强制
rm -rf /
rm -rf /tmp/*
[root@localhost ~]# ls
anaconda-ks.cfg initial-setup-ks.cfg lxh
[root@localhost ~]# rm -rf lxh
[root@localhost ~]# ls
anaconda-ks.cfg initial-setup-ks.cfg
[root@localhost ~]#
mv 移动
[root@localhost ~]# touch x
[root@localhost ~]# mkdir h
[root@localhost ~]# mv x h
[root@localhost ~]# ls
anaconda-ks.cfg h initial-setup-ks.cfg
[root@localhost ~]#
clear 清屏
ctrl+l 清屏 等价于clear
ctrl+c 中断当前命令
[root@localhost ~]# ping baidu.com
PING baidu.com (220.181.38.148) 56(84) bytes of data.
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=1 ttl=128 time=20.8 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=2 ttl=128 time=19.2 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=3 ttl=128 time=19.2 ms
^C
--- baidu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 19.262/19.792/20.841/0.750 ms
[root@localhost ~]#
uname 查看系统信息
[root@localhost ~]# uname
Linux
[root@localhost ~]#
uname -a 查看系统详细信息
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#
uname -r 查看内核版本
[root@localhost ~]# uname -r
3.10.0-957.el7.x86_64
[root@localhost ~]#
shutdown 关机
shutdown【参数】时间【警示信息】
-r reboot 重启
[root@localhost ~]# shutdown -r
- h halt 关机
[root@localhost ~]# shutdown -h
now 立即关机
[root@localhost ~]# shutdown -h now
hh:mm 小时:分钟
[root@localhost ~]# shutdown -r 10:30
eg:shutdown -h now 立即关机 等价于 poweroff
eg:shutdown -h hh:mm 指定时间关机