Systemd cheat sheet

From MyLabWiki
Revision as of 22:32, 12 January 2015 by Alex (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Install and enable a service

Install the service file and reload the daemon

 $ sudo cp myservice.service /etc/systemd/system/
 $ sudo systemctl --system daemon-reload

Manually start the service

 $ sudo systemctl start myservice.service

Manually stop the service

 $ sudo systemctl stop myservice.service

Enable the service

 $ sudo systemctl enable myservice.service

Disable the service

 $ sudo systemctl disable myservice.service