linux系统管理命令——shutdown、half、poweroff、reboot

本文介绍了Linux中用于系统管理的四个关键命令:shutdown、halt、poweroff和reboot。shutdown命令允许系统管理员在执行关机程序前通知所有用户,同时支持关机和重启操作。halt命令在runlevel 0或6时关闭系统,否则使用shutdown -h代替。poweroff直接关闭计算机并切断电源。reboot命令则用于重启计算机,当runlevel为0或6时直接执行,否则通过shutdown -r实现。
摘要由CSDN通过智能技术生成

 shutdown

Linux shutdown命令可以用来进行关机程序,并且在关机以前传送讯息给所有使用者正在执行的程序,shutdown 也可以用来重开机。

使用权限:系统管理者。

[root@kvm ~]# 
[root@kvm ~]# shutdown --help
shutdown [OPTIONS...] [TIME] [WALL...]

Shut down the system.

     --help      Show this help
  -H --halt      Halt the machine
  -P --poweroff  Power-off the machine
  -r --reboot    Reboot the machine
  -h             Equivalent to --poweroff, overridden by --halt
  -k             Don't halt/power-off/reboot, just send warnings
     --no-wall   Don't send wall message before halt/power-off/reboot
  -c             Cancel a pending shutdown
[root@kvm ~]# 

halt

若系统的 runlevel 为 0 或 6 ,则Linux halt命令关闭系统,否则以 shutdown 指令(加上 -h 参数)来取代。

使用权限:系统管理者。


[root@kvm ~]# halt --help
halt [OPTIONS...]

Halt the system.

     --help      Show this help
     --halt      Halt the machine
  -p --powero
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值