1. history #显示命令的历史记录
选项:
-c #清除所有的历史记录
-d #删除历史ID对应的命令
-w #将当前历史记录保存到默认的文件中 ~/.bash_history
2. alias #设置别名
用法:
alias test='执行的命令'
3. unalias #取消别名
用法:
unalias test(别名)
4. shutdown #关机及重启的命令
选项:
-h #关机
0 #立刻关机
now #立刻关机
12:00 #定时关机
-r #重启
0 #立刻重启
now #立刻重启
12:00 #定时重启
-c #取消定时的关机或者重启
5. poweroff #关机命令
6. halt #关机命令,只关系统,不关电源
选项:
-p #关闭电源及系统
7. init #切换运行级别
0 #关机 将运行级别切换为关机级别
6 #重启 将运行级别切换为重启级别
8. reboot #重启
9. logout #退出当前登录的用户 ,不能退出非登录式shell
10. exit #退出当前登录的用户,主要用于脚本退出
11. ip #显示网络IP信息
选项:
address #显示所有IP地址 简写为 a
a s eth0 #显示某个网卡的信息 是address show eth0的简写
12. ifconfig #显示所有ip地址的信息
eth0 #显示某块网卡的信息
13. hostname #显示系统主机名
选项:
-i #显示所有IP地址,包括IPv6地址
-I #只显示IPv4地址
14. man #显示命令的帮助信息
15. help #显示系统内置命令的帮助信息
16. info #显示命令的说明信息