Linux关机命令

如题所述

在Linux里面,不能够直接用电源按钮关机,也不能直接用reset按钮重新启动,这对系统,尤其是硬盘有比较大的影响。关机命令是halt,重启动命令是reboot。其实还有shutdown命令完成类似功能
温馨提示:内容为网友见解,仅供参考
第1个回答  2015-08-13
shutdown -h now
马上关机

Usage: shutdown [OPTION]... TIME [MESSAGE]
Bring the system down.

Options:
-r reboot after shutdown
-h halt or power off after shutdown
-H halt after shutdown (implies -h)
-P power off after shutdown (implies -h)
-c cancel a running shutdown
-k only send warnings, don't shutdown
-q, --quiet reduce output to errors only
-v, --verbose increase output to include informational messages
--help display this help and exit
--version output version information and exit本回答被网友采纳
第2个回答  2020-03-01
-t
***
将重新启动或关机前超时期限或延迟设置为
***
秒会使得在本地控制台显示一条警告信息。
指定的范围为
0
-
600
第3个回答  2010-07-08
sudo shutdown -h now
或是:sudo halt now。
第4个回答  2013-05-03
echo b > /proc/sysrq-trigger 就相当于 按下了reset键
poweroff命令直接关机
相似回答