- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2019-12-26T18:19:32+09:00","default:honma","honma")
#author("2020-02-14T10:09:21+09:00","default:honma","honma")
* systemctlコマンド [#l76f3c77]
Debian でも システム管理に systemd を採用しているが、systemd を制御するコマンドが systemctl になる。~
shutdown コマンドが利用できないと慌てると、シンボリックリンクが張られていなかったりする。~
** コマンド対応表 [#sd1a2e0a]
|従来|systemctl|機能|h
|halt|systemctl halt|システムの停止|
|poweroff|systemctl poweroff|電源を切る|
|reboot|systemctl reboot|再起動|
|suhtdown|systemctl poweroff|電源を切る|
ちなみに
-halt ... CPUを停止させて電源は落とさない
-poweroff ... OSを終了させて電源を落とす
-reboot ... 再起動
-shutdown ... シャットダウンスクリプトを実行して電源を落とす
** コマンドの所在 [#fa5796ce]
# which halt poweroff reboot shutdown
/sbin/halt
/sbin/poweroff
/sbin/reboot
/sbin/shutdown
** リンクの確認 [#se2c5865]
# ls -l /sbin/halt /sbin/poweroff /sbin/reboot /sbin/shutdown
lrwxrwxrwx 1 root root 14 7月 22 03:43 /sbin/halt -> /bin/systemctl
lrwxrwxrwx 1 root root 14 7月 22 03:43 /sbin/poweroff -> /bin/systemctl
lrwxrwxrwx 1 root root 14 7月 22 03:43 /sbin/reboot -> /bin/systemctl
lrwxrwxrwx 1 root root 14 7月 22 03:43 /sbin/shutdown -> /bin/systemctl
** ヘルプ [#h3fef296]
systemctl はいろいろな機能があるが、システムコマンドのみを抜粋
# systemctl --help
:
System Commands:
is-system-running Check whether system is fully running
default Enter system default mode
rescue Enter system rescue mode
emergency Enter system emergency mode
halt Shut down and halt the system
poweroff Shut down and power-off the system
reboot [ARG] Shut down and reboot the system
kexec Shut down and reboot the system with kexec
exit [EXIT_CODE] Request user instance or container exit
switch-root ROOT [INIT] Change to a different root file system
suspend Suspend the system
hibernate Hibernate the system
hybrid-sleep Hibernate and suspend the system
なぜか suhtdown の表記がない?
#htmlinsert(amazon_pc.html);