Linux-关机命令

博客介绍了操作系统中的关机命令shutdown,其格式为shutdown [OPTION]... TIME [MESSAGE],即选项+时间+信息。还列举了常见关机命令,如 -a 验证身份、-t 接时间、-r 重启、-h 停机、-c 取消操作等,并给出示例。

关机命令

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. 

 

转载于:https://www.cnblogs.com/061713xlhj/p/10555405.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值