Systemd

From Christoph's Personal Wiki
Revision as of 01:41, 14 May 2015 by Christoph (Talk | contribs) (New page: '''systemd''' is a suite of system management daemons, libraries, and utilities designed as a central management and configuration platform for the Linux computer operating system. ==Exam...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

systemd is a suite of system management daemons, libraries, and utilities designed as a central management and configuration platform for the Linux computer operating system.

Example usage

$ systemctl list-units
$ systemctl list-units -t service
$ systemctl list-units | grep .service
$ systemctl list-units -t target
$ systemctl list-unit-files
$ systemctl list-unit-files -t target
$ systemctl list-dependencies multi-user.target
$ systemctl [status|stop|enable|disable|restart] ssh.service
$ systemctl is-enabled ssh.service
$ systemctl [reboot|poweroff|suspend]
$ systemctl --failed
  UNIT              LOAD   ACTIVE SUB    DESCRIPTION
● pollinate.service loaded failed failed Seed the pseudo random number generator on first boot
● vboxadd.service   loaded failed failed LSB: VirtualBox Linux Additions kernel modules
LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

journalctl

Note: combine with syslog-ng for backward compatibility.

$ journalctl
$ journalctl -b  # show only logs from this boot
$ journalctl -b -1 # show only logs from previous boot
$ journalctl -u ssh  # show only logs for a given unit
$ journalctl |grep -Ei 'error|fail'
$ journalctl -f  # follow (somewhat analogous to `tail -f /var/log/messages`)

External links