Mini systemd command cheat-sheet

These are the most common commands I use if my systemd service file is placed in /etc/systemd/system/myservice.service.

Enable (i.e. start at boot) and also start the service right now (--now):

example-7.sh

Start by

example-6.sh

Restart by

example-5.sh

Stop by

example-4.sh

View status:

example-3.sh

View & follow logs:

example-2.sh

View logs in less:

example-1.sh

 


Check out similar posts by category: Linux