Fork me on GitHub

Linux-关机命令

关机命令

shutdown [OPTION]... TIME [MESSAGE]

shutdown 选项+时间+信息

常见的关机命令有

shutdown -a ===>使用/etc/shutdown.allow 来验证身份

shutdown -t  ===>t表示time 后面一般会接时间(s秒),表示多久之后,在发送kill信号

shutdown -r  ===> r表示reboot,重启

shutdown -h ===> h表示halted停机。

shutdown -c ===> c表示cancels ,取消shutdown操作

shutdown -h 20:30 'This system will shutdown,please save your file'

表示在20:30关闭系统并提示告诉所有用户,这个系统将关闭,请保存你的文件。

1 [root@VM_0_3_centos ~]# shutdown -h 20:30 'This system will shutdown,please save your file.'
2 
3 Broadcast message from root@VM_0_3_centos
4     (/dev/pts/0) at 19:47 ...
5 
6 The system is going down for halt in 43 minutes!
7 This system will shutdown,please save your file. 

 

posted @ 2019-03-18 21:53  苦逼运维-匿名  阅读(788)  评论(1编辑  收藏  举报
1 2 3 4