XWLinux

systemctl

Zarządzanie usługami systemd.

Opis

systemctl to interfejs do systemd. Start/stop/restart usług, enable/disable na boot, status z logami, dependency tree, targety (multi-user, graphical).

Przykłady

$ systemctl status nginx --no-pager
Status usługi nginx
$ systemctl enable --now docker
Włącz i uruchom Docker
$ systemctl restart sshd
Restart SSH
$ systemctl list-units --state=failed
Usługi w stanie failed
$ systemctl --failed
Krótko: failed units
$ systemctl cat nginx
Pokaż unit file
$ systemctl show nginx -p ExecMainStartTimestamp
Kiedy ruszył

Flagi

FlagaOpis
start/stop/restart Zarządzanie cyklem życia
enable/disable Start on boot
--now Zaraz (po enable/disable)
--status Status + ostatnie logi
--failed Tylko failed
--no-pager Bez less
cat Pokaż definicję unit
show -p Wartości properties