Systemd
Status of a Service
systemctl status application.service
systemctl is-active application.service
systemctl is-enabled application.service
systemctl is-failed application.service
Starting, stopping and restarting
the .service extention is not required if the application name is unique
systemctl start application.service
systemctl stop application.service
systemctl restart application.service
systemctl reload application.service #Not for all services
systemctl reload-or-restart application.service #Covers both varations
Enable and Disable Services
systemctl enable application.service
systemctl disable application.service #Can still be used manually - See 'mask'
General Overviews
systemctl list-units #Only shows active/running units
systemctl list-units --all --state=inactive #Show units active or failed
systemctl list-units --all --state=inactive #Look for failed units
systemctl list-unit-files # List all possible units
Managing Units
systemctl cat application.service #Show unit contents
systemctl list-dependencies application.service #Things that the unit needs
systemctl show application.service #Show basic settings
systemctl mask application.service #Block unit from manual start
Edting Units
systemctl edit application.service #Blank file ready for unit overrides
systemctl edit --full application.service #Open the original file to edit
rm -r /etc/systemd
/system/application.service.d
#Remove overrides you have added
systemctl daemon-reload #required after editing/deleting files outside of systemctl
Runlevels
systemctl get-default #Show current default boot target
systemctl set-default graphical.target #Set new default boot target
systemctl list-unit-files --type=target #Show possible default boot targets
systemctl isolate multi-user.target #Switch to runlevel without reboot
systemctl rescue #shortcut for 'systemctl isolate rescue.target'
systemctl halt #Halt without switching off
systemctl poweroff #Halt and switchoff
systemctl reboot #warm reboot - also 'reboot'