systemd 101
Steven Pritchard
Southern Illinois Linux Users Group
What is systemd?
systemd is a modern init implementation for Linux designed to start fewer services in parallel.
What problems does systemd solve?
What problems does systemd solve?
What does systemd replace?
Managing Runlevels
$ ls -ld /etc/systemd/system/default.target�lrwxrwxrwx. 1 root root 36 Oct 28 2010 /etc/systemd/system/default.target -> /lib/systemd/system/runlevel5.target�$ ls -ld /lib/systemd/system/runlevel5.target�lrwxrwxrwx 1 root root 16 Jan 20 20:38 /lib/systemd/system/runlevel5.target -> graphical.target
/lib/systemd/system/graphical.target
[Unit]�Description=Graphical Interface�Documentation=man:systemd.special(7)�Requires=multi-user.target�After=multi-user.target�Conflicts=rescue.target�Wants=display-manager.service�AllowIsolate=yes��[Install]�Alias=default.target
systemctl
systemctl list-units
systemctl enable foo.service
systemctl start foo.service
systemctl stop foo.service
systemctl restart foo.service
systemctl reload foo.service
systemctl status foo.service
journalctl
journalctl _SYSTEMD_UNIT=foo.service
journalctl -u foo
journalctl -f
Other commands
halt (8) - Halt, power-off or reboot the machine
hostnamectl (1) - Control the system hostname
init (1) - systemd system and service manager
journalctl (1) - Query the systemd journal
kernel-install (8) - Add and remove kernel and initramfs
images to and from...
localectl (1) - Control the system locale and keyboard
layout settings
loginctl (1) - Control the systemd login manager
poweroff (8) - Halt, power-off or reboot the machine
Other commands
reboot (8) - Halt, power-off or reboot the machine
runlevel (8) - Print previous and current SysV runlevel
shutdown (8) - Halt, power-off or reboot the machine
systemctl (1) - Control the systemd system and service
manager
systemd (1) - systemd system and service manager
Other commands
systemd-analyze (1) - Analyze system boot-up performance
systemd-ask-password (1) - Query the user for a system password
systemd-cat (1) - Connect a pipeline or program's output
with the journal
systemd-cgls (1) - Recursively show control group contents
systemd-cgtop (1) - Show top control groups by their resource
usage
systemd-coredumpctl (1) - Retrieve coredumps from the journal
systemd-delta (1) - Find overridden configuration files
systemd-detect-virt (1) - Detect execution in a virtualized
environment
Other commands
systemd-inhibit (1) - Execute a program with an inhibition lock
taken
systemd-machine-id-setup (1) - Initialize the machine ID in
/etc/machine-id
systemd-notify (1) - Notify service manager about start-up
completion and o...
systemd-nspawn (1) - Spawn a namespace container for
debugging, testing and...
systemd-tmpfiles (8) - Creates, deletes and cleans up volatile
and temporary ...
systemd-tty-ask-password-agent (1) - List or process pending
systemd password...
Other commands
telinit (8) - Change SysV runlevel
timedatectl (1) - Control the system time and date
udevadm (8) - udev management tool