1.关机重启命令
(1)shutdown
shutdown -h now:表示立即关机
shutdown -h 1:表示1分钟后关机
shutdown -r now:立即重启
(2)halt:就是直接使用,效果等价于关机
(3)reboot:就是重启系统
(4)sync:把内存的数据同步到磁盘
不管是重启系统还是关闭系统,首先要运行sync命令,把内存中的数据写到磁盘中。
2.用户的登录和注销
(1)logout
注销用户