Instantly share code, notes, and snippets.

Embed
What would you like to do?
Systemctl Cheatsheet

Service Management

Starting and Stopping Services

Starting

sudo systemctl start application.service

or simply

sudo systemctl start application

Stopping

sudo systemctl stop application.service

Restarting and Reloading

sudo systemctl restart application.service

If the application in question is able to reload its configuration files (without restarting), you can issue the reload command to initiate that process:

sudo systemctl reload application.service

Enabling and Disabling Services

The above commands are useful for starting or stopping commands during the current session.

sudo systemctl enable application.service
sudo systemctl disable application.service

Checking the Status of Services

systemctl status application.service
systemctl is-active application.service
systemctl is-enabled application.service
systemctl is-failed application.service

Verify a service file

sudo systemd-analyze verify application.service

Following the logs dor those services

sudo journalctl -u application.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment