Systemd commands
Systemd has a range of commands to interact with the systemd services and functions. Typically daemons will have a ’d’ in their name, such as systemd-networkd, while client tools end with ‘ctl’ (systemctl). Here is an overview of the available commands and their purpose.
Primary commands
Journalctl
Events are stored in a journal, similar to what syslog does. The biggest exception is the way log information is stored and how it is queried. As data is stored in a binary format, the journalctl command can filter out relevant information.
Systemctl
To control systemd units, such as services, the systemctl command is used.
Some functions include:
- Start and stop service or unit
- Show status of a unit
- Show dependencies
Looking for a quick overview how to use? Have a look at these cheat sheets:
Overview of systemd commands
Command | Purpose | Available since |
---|---|---|
bootctl | Manage EFI firmware boot settings for the boot loader | 198 |
busctl | Connect to D-Bus to query information | 199 |
coredumpctl | List and process stored core dumps | 195 |
homectl | Create, change, remove, inspect home directories | 245 |
hostnamectl | Shows hostname, system type, hardware architecture, OS and kernel version, and allows hostname and location change | 195 |
importctl | Download, import, and export disk images via systemd-importd | 256 |
journalctl | Show systemd journal entries | 183 |
kernel-install | Manage kernel and initrd images on the boot partition | 198 |
localectl | Manage system locale and keyboard layout | 195 |
loginctl | Controls the systemd login manager and can also be used to query information about users | 183 |
machinectl | Introspect and control virtual machine and container registry registration manager | 205 |
networkctl | Query or modify network links known to systemd-networkd | 216 |
oomctl | Retrieve information from systemd-oomd service, a userspace OOM killer | 247 |
portablectl | Attach, detach, or inspect portable service images | 239 |
resolvconf | Configure interfaces for systemd-resolved service | 239 |
resolvectl | Query network name resolution from systemd-resolved, show DNS settings and resolver | 239 |
run0 | Acts like sudo and uses the systemd-run multi-call binary | 256 |
systemctl | Start, stop, monitor, and change units | |
systemd-ac-power | Report if system is connected to external power source (AC) | |
systemd-activate | Test socket activation from the command line to simplify troubleshooting | 198 |
systemd-analyze | Analyze and debug system manager, from boot order details up to showing general information | |
systemd-ask-password | Ask the user a password, like encryption password of a disk | |
systemd-boot | UEFI boot manager | |
systemd-cat | Read information and put this into the systemd journal | 39 |
systemd-cgls | Show Linux control group in a tree | |
systemd-cgtop | Monitor control group usage, similar to top for processes | 39 |
systemd-confext | Uses System Extension Images, to extend an existing file path at runtime, with focus on /etc directory. | 254 |
systemd-coredump | Process core dump and log to journal | |
systemd-coredumpctl | Extract core dumps from the journal | 195 |
systemd-creds | Show, encrypt, or decrypt credentials such as keys, certificates, user account information | 250 |
systemd-cryptenroll | Enroll hardware security tokens and devices into LUKS volumes | 248 |
systemd-cryptsetup | Provides access to encrypted block devices | |
systemd-delta | Show configuration files that are overridden | 183 |
systemd-detect-virt | Determine if execution is done from within a virtual machine | |
systemd-dissect | Introspect and interact with file system OS disk images | 233 |
systemd-escape | Helper utility to escape or unescape text strings for usage in systemd units | 216 |
systemd-firstboot | Performs specific actions before or during the first boot of the system | |
systemd-gpt-auto-generator | Unit generator to automatically discover common paths including partitions | |
systemd-hwdb | Manages binary hardware database, a key-value store related to udev | 219 |
systemd-id128 | Generate and show UUIDs (id-128 identifiers) | 240 |
systemd-inhibit | Provides a lock to prevent events like a system sleep or shutdown to stop execution of an important process | |
systemd-journal-remote | Stream journal messages over the network | 212 |
systemd-journal-upload | Allows sending journal messages over the network to another system | 216 |
systemd-keyutil | Administration tool for private keys and X.509 certificates | 257 |
systemd-logind | Manages user logins | |
systemd-machine-id-setup | Initialize /etc/machine-id file, so a machine ID is stored | |
systemd-measure | Calculate and sign TPM2 PCR values for provided UKI | 252 |
systemd-mount | Create or start a mount or automount unit | 232 |
systemd-notify | Notify service manager about daemon status changes | |
systemd-network-generator | Generates a network configuration from the kernel command line | 243 |
systemd-network-wait-online | Wait for network connectivity using systemd-networkd | 212 |
systemd-networkd | System service to manage network connectivity | |
systemd-nspawn | Run a command or OS in a light-weight container | |
systemd-path | Query system and user paths | 215 |
systemd-pcrphase | Allows binding access to TPM2-encrypted secrets, such as for LUKS, to just specific phases of the boot itself, but not later. | 252 |
systemd-readahead | Analyze readahead files that are created during boot | 186 |
systemd-repart | Automatically create and grow partitions | 245 |
systemd-resolve | Interface to systemd-resolved to provide network name resolution for local applications | |
systemd-run | Run command within some types of unit files and active the related service | 205 |
systemd-sbsign | Sign EFI binaries (PE) for Secure Boot | 257 |
systemd-socket-active | Tool to test socket activation of daemons | |
systemd-socket-proxyd | Socket forwarder proxy daemon for IPv4, IPv6, and UNIX stream sockets | 209 |
systemd-ssh-proxy | Utility to allow ssh to connect to AF_VSOCK and AF_UNIX sockets using ProxyCommand | 256 |
systemd-stdio-bridge | Proxy between STDIN/STDOUT and a bus within D-Bus | |
systemd-sysext | Activates system extension images to dynamically extend existing file paths (/opt, /usr) | 248 |
systemd-sysupdated | System service to update the system via unprivileged clients (uses D-Bus) | 257 |
systemd-sysusers | Allocation of system users and groups | 215 |
systemd-tmpfiles | Deals with temporary files, such as its creation and deletion | |
systemd-tty-ask-password-agent | List or process queued systemd password requests | |
systemd-udevd | Listens to kernel uevents and perform instructions as defined in udev rules | 183 |
systemd-umount | Unmount utility for specific unit files | |
systemd-userdbd | Translates user/group lookups to JSON user/group record definitions, including support for classic UNIX/glibc NSS records | |
systemd-vpick | Implementation of vpick protocol for versioned files using Linux UAPI version format specification | |
systemd-vmspawn | Similar to systemd-nspawn but launches a full virtual machine instead | 255 |
timedatectl | Show information about clock sources and synchronization state | |
udevadm | Manage runtime behavior of systemd-udevd and gathering information about kernel events, event queue, and some basic troubleshooting with udev | |
updatectl | Check and install system updates that are managed by systemd-sysupdated | 257 |
userdbctl | Utility that interacts with systemd-userdbd to show available users | |
varlinkctl | Lookup or request a specific varlink service | 255 |
Missing a particular command? Let it know!