Skip to content

systemctl

Control the systemd system and service manager (https://www.freedesktop.org/software/systemd/man/latest/systemctl.html)

To check systemctl version

systemctl --version

To check the status of a service

systemctl status <service>

To start, stop, or restart a service

systemctl start <service>
systemctl stop <service>
systemctl restart <service>

To reload a service's configuration (without restarting)

systemctl reload <service>

To enable or disable a service to startup on boot

systemctl enable <service>
systemctl disable <service>

To edit a service's configuration override file

systemctl edit <service>

To check if a service is active (returns exit code 0 if active)

systemctl is-active <service>

To check if a service has failed (returns exit code 0 if failed)

systemctl is-failed <service>

To check if a service is enabled to run on boot

systemctl is-enabled <service>

To show only a specific property value of a service (ideal for scripting)

systemctl show -p <property> --value <service>

Example: systemctl show -p ActiveState --value ufw

To list all failed services:

systemctl --failed

To list active loaded services

systemctl list-units --type=service

To list all loaded service files and their enablement status

systemctl list-unit-files --type=service

To reload systemd manager configuration (after changing unit files)

systemctl daemon-reload

To list currently loaded targets

systemctl list-units --type=target

To change current system target (e.g. multi-user or graphical)

systemctl isolate <target>

To set the default boot target

systemctl set-default <target>

To manage user-specific services

systemctl --user <start|stop|restart|status> <service>

To show dependencies of a service

systemctl list-dependencies <service>

To shut down or reboot the system

systemctl poweroff
systemctl reboot