Linux / Ubuntu 關機命令

Linux / Ubuntu 關機命令

1. halt
停止系統運行,但不關閉電源,需要手工關閉電源,不建議用於關機。

strong@ubuntu:~$ halt
Failed to start halt.target: Interactive authentication required.
See system logs and 'systemctl status halt.target' for details.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.
strong@ubuntu:~$ 
strong@ubuntu:~$ sudo halt

2. poweroff
停止系統運行,同時關閉電源,建議用於關機。

strong@ubuntu:~$ poweroff

3. shutdown -h now
立刻關機。

strong@ubuntu:~$ shutdown -h now

4. shutdown -h 1
shutdown -h 1 # 1 分鐘後自動關機。如果是通過 shutdown 命令設置關機的話,可以用 shutdown -c 命令取消。

strong@ubuntu:~$ shutdown -h 1
Shutdown scheduled for Sun 2018-10-28 01:18:29 PDT, use 'shutdown -c' to cancel.
strong@ubuntu:~$ 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章