Show Menu

systemd Cheat Sheet by

Systemd : system state, services management, troubleshooting and runlevels.

System state

Old command
Systemd command
systemctl halt
Halts the system.
systemctl poweroff
Powers off the system.
systemctl reboot
Restarts the system.
systemctl suspend
Suspends the system.
systemctl hibernate
Hibernates the system.
systemctl hybrid­-sleep
Hibernates and suspend the system.

Services management

SysVinit command
Systemd command
service httpd start
systemctl start httpd.s­ervice
Start a service (not reboot persis­tent).
service httpd stop
systemctl stop httpd.s­ervice
Stop a service (not reboot persis­tent).
service httpd restart
systemctl restart httpd.s­ervice
Restart a service.
service httpd reload
systemctl reload httpd.s­ervice
Reloads the config­uration files without interr­upting pending operat­ions.
service httpd condre­start
systemctl condre­start httpd.s­ervice
Restarts if the service is already running.
service httpd status
systemctl status httpd.s­ervice
Shows the status of a service.
service --stat­us-all
systemctl list-units --type­=se­rvice
Displays the status of all services.
ls /etc/r­c.d­/in­it.d/
systemctl list-u­nit­-files --type­=se­rvice
List the services that can be started or stopped.
chkconfig httpd on
systemctl enable httpd.s­ervice
Start service at next boot.
chkconfig httpd off
systemctl disable httpd.s­ervice
Service won't be started on next boot.
chkconfig httpd
systemctl is-enabled httpd.s­ervice
Check if a service is configured to start in the current enviro­nment.
chkconfig --list
systemctl list-u­nit­-files --type­=se­rvice or ls /etc/s­yst­emd­/sy­ste­m/*.wants/
Print a list of services showing which runlevels they are configured for.
chkconfig httpd --list
ls /etc/s­yst­emd­/sy­ste­m/*.wa­nts­/ht­­rvice
Show which runlevels a service is configured for.
chkconfig httpd --add
systemctl daemon­-reload
Run this command after a change in any config­uration file (old or new).


systemctl get-de­fault
Determine which target unit is used by default.
systemctl set-de­fault multi-­use­r.t­arget
Change default boot target to multi-­use­r.t­arget.
journalctl -b
Show all messages from last boot.
journalctl -b -p err
Show all messages of priority level ERROR and more from last boot.
journalctl -p warning --sinc­e="2­015­-07-31 12:34:­56" --unti­l="2­015­-09-19 23:59:­59"
View the messages of priority level WARNING or more from a certain date and time.
journalctl -f
Follow new messages a la tail -f.
journalctl -u SERVICE
Show logs for SERVICE.
journalctl /usr/s­bin­/httpd
Show all messages related to a specific execut­able.
journalctl --full
Display all messages without truncating any.
systemctl --stat­e=f­ailed
Display the services that failed to start.
systemctl list-units --type­=target
Show current runlevel.
systemctl isolate graphi­
Change the current runlevel (target).
systemctl rescue­/em­ergency
Switch to Rescue (single user)/­Eme­rgency mode.
systemctl kill SERVIC­E.s­ervice
Gently kill SERVICE (SIGT­ERM, 15).
Show the full systemd control group (cgroup) hierarchy as a tree.
systemctl show -p "­Wan­ts" multi-­use­r.t­arget
Find out what other units does a unit depend on.
systemctl list-jobs
Show jobs.


SysVinit runlevel
Systemd target
runlev­el0.ta­rget, powero­ff.t­arget
Halt the system.
1, s, single
Single user mode.
2, 4
runlev­el2.ta­rget, runlev­el4.ta­rget, multi-­use­r.t­arget
User-d­efined runlevels (identical to 3).
runlev­el3.ta­rget, multi-­use­r.t­arget
Multi-­user, non-gr­aph­ical.
runlev­el5.ta­rget, graphi­
Multi-­user, graphical.
Emergency shell.

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi


No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Linux Command Line Cheat Sheet
          Journalctl Cheat Sheet

          More Cheat Sheets by TME520

          ping Cheat Sheet
          Wardriving Quick Reference Cheat Sheet
          dwm Cheat Sheet