Systemd cheat sheet

From MyLabWiki
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