- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2019-12-26T18:17:07+09:00","default:honma","honma")
* systemctlコマンド [#l76f3c77]
Debian でも システム管理に systemd を採用しているが、systemd を制御するコマンドが systemctl になる。~
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