date
显示时间,形如Sat Aug 11 10:06:44 CST 2018
date +%F
date +%T
date -d “-2 day” +%A
date -d “-2 hour -2 minute” +%T
date +%A
date +%B
date +%s
date +%D
显示日期mm/dd/yy,形如08/11/18
echo $PATH
echo $SHELL
cat /etc/shells
显示当前系统使用的所有shell
hash
help hash
hash -d ls
hash -r
清空所有命令的缓存
history
history -a
追加本次会话新执行的命令历史列表到历史文件(~/.bash_history)中
history -d 12
history -c
!n
!string
!!
重复运行上一条命令
printenv
查看Linux系统环境变量
shutdown -r now
shutdown -h now
shutdown -h +3
shutdown -h 11:30
shutdown -c
取消关机
关机:halt,poweroff,shutdown,init 0
重启:reboot,shutdown,init 6
tty
查看当前的终端设备
type cd
查看一个命令是内建命令还是外部命令
which ls
可查看ls命令对应的可执行程序位置(也可以使用whereis ls)
whereis ls
whatis getent
查询getent命令所属的章节
centos6需要makewhatis
centos7需要mandb
whoami
who
w
系统当前所有的登录会话及所做的操作
