User Tools

Site Tools


Systemd general commands

Here alls command on Systemd

  • Command for start / stop / status

systemctl start service.service
systemctl stop service.service
systemctl restart service.service

  • Create a service

In terminal, modify :

$nano /etc/systemd/system/some_script.service

Add the following example :


enable script with daemon :

$chmod 744 /root/script/
$systemctl daemon-reload
$systemctl enable some_script.service

Test your script :

$systemctl start  some_script.service

  • Debug a service

In terminal :

#debug for the service "SERVICENAME.service"
$journalctl -u SERVICENAME.service

- modified date : 2017.06.12 -

create_a_service_via_systemd.txt · Last modified: 2017/06/12 17:06 (external edit)