Skip to Content

systemctl Common Commands

Service Management

CommandDescription
sudo systemctl start service-nameStart a service
sudo systemctl stop service-nameStop a service
sudo systemctl restart service-nameRestart a service
sudo systemctl reload service-nameReload configuration (without restarting)
systemctl status service-nameCheck service status

Boot Startup

CommandDescription
sudo systemctl enable service-nameEnable auto-start at boot
sudo systemctl disable service-nameDisable auto-start at boot
sudo systemctl enable --now service-nameEnable auto-start and start immediately
systemctl is-enabled service-nameCheck if auto-start is enabled
systemctl is-active service-nameCheck if currently running

List Services

CommandDescription
systemctl list-units --type=service --state=runningList all running services
systemctl list-units --type=service --allList all services (including inactive)
systemctl list-unit-files --type=service --state=enabledList all boot-enabled services
systemctl list-units --failedList failed services

User-level Services

CommandDescription
systemctl --user start service-nameStart a user-level service
systemctl --user stop service-nameStop a user-level service
systemctl --user status service-nameCheck user-level service status
systemctl --user enable service-nameEnable user-level service auto-start
systemctl --user list-units --type=serviceList user-level services

Common user-level services: pipewire, pipewire-pulse, wireplumber

System Power Management

CommandDescription
systemctl poweroffPower off
systemctl rebootReboot
systemctl suspendSuspend
systemctl hibernateHibernate
systemctl hybrid-sleepHybrid sleep

View Service Details

CommandDescription
systemctl show service-name -p FragmentPathShow service configuration file path
systemctl cat service-nameShow full service configuration
systemctl show service-nameShow all service properties
systemctl list-dependencies service-nameShow service dependency tree

Modify Service Configuration

CommandDescription
sudo systemctl edit service-nameCreate or edit override configuration
sudo systemctl daemon-reloadReload configuration after changes
sudo systemctl restart service-nameRestart service to apply changes

The override file is located at /etc/systemd/system/service-name.service.d/override.conf. Do not directly edit files in /lib/systemd/system/.

Timers

CommandDescription
systemctl list-timers --allList all timers
systemctl status timer-name.timerCheck timer status
sudo systemctl enable --now timer-name.timerEnable a timer
sudo systemctl disable timer-name.timerDisable a timer
CommandDescription
journalctl -u service-nameView service logs
journalctl -u service-name -fFollow service logs in real time
journalctl -u service-name -bView service logs since current boot

Targets (Run Levels)

TargetDescription
graphical.targetGraphical interface (default)
multi-user.targetMulti-user command line
rescue.targetRescue mode
emergency.targetEmergency mode
CommandDescription
systemctl get-defaultCheck current target
sudo systemctl set-default multi-user.targetBoot to command line
sudo systemctl set-default graphical.targetBoot to graphical interface
sudo systemctl isolate multi-user.targetTemporarily switch target

Useful Tips

CommandDescription
sudo systemctl mask service-nameMask a service (completely prevent starting)
sudo systemctl unmask service-nameUnmask a service
systemd-analyzeCheck boot time
systemd-analyze blameRank services by boot time
systemd-analyze critical-chainShow critical boot chain
Last updated on