Skip to content

systemd

一套 Linux 操作系统系统管理工具。

常用命令

查看日志 journalctl -f -u sshd

list services

shell
systemctl list-units --type=service --all

systemctl list-units --type=service --state=running

systemctl list-unit-files --state=enabled

systemctl list-units --type=service --state=failed,exited

Inspect service systemctl status sshd

Enable service systemctl enable sshd

Disable service systemctl disable sshd

Start service systemctl start sshd

Stop service systemctl stop sshd

FAQs

Hint: You are currently not seeing messages from other users and the system. Users in groups 'adm', 'systemd-journal' can see all messages.

Solution: sudo usermod -a -G systemd-journal ubuntu

Released under the CC-BY-NC-4.0