Show Menu
Cheatography

systemd Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Path

/lib/s­yst­emd­/system
(Linux Mint) where you put .service files

Control an Unit

systemctl
start [unit]
start the unit
 
stop ~
stop the unit
 
status ~
show status of the unit
 
restart ~
restart the unit
 
enable ~
start unit on boot
 
disable ~
not start unit on boot
 
reload ~
reload config­uration
 
is-active ~
is the unit running?
 
is-enabled ~
will the unit started on boot?
 
mask ~
disallow the unit to start
 
unmask ~
undo what mask does

Control Services

systemctl
(list-­units)
list all active units
 
(list-­units) --all
list all units
 
(list-­units) --type­=[type] --all
list all units of type
 
daemon­-reload
reload all units
 
list-d­epe­nde­ncies [unit]
list depend­encies of unit
 
~ [unit] --reverse
list the units depend on unit

Service File

[Unit]
Descri­ption
service name
~
Requires
e.g. networ­k.t­arget