The newish init system for Linux. Although it has been around since 2010 it has been slow to gain popularity. Currently the major Linux distributions are using it.
To see all of the active units running on your system, type the below into a terminal.
sudo systemctl
This has the units grouped by type such as service or target. To show only services type.
sudo systemctl list-units --type=service
To show all installed unit files use
sudo systemctl list-unit-files
To see the details of a service such as '
sudo systemctl status ssh.service
With all of these commands you may need to press the '
Now to turn the
I have the file in
sudo chmod +x /home/debian/progs/blink.py
To create the service command file type.
sudo vim /lib/systemd/system/blink.service
And enter the below.
[Unit]
Description=Blink Service
[Service]
ExecStart=/home/debian/progs/blink.py
StandardOutput=null
[Install]
WantedBy=multi-user.target
Alias=blink.service
To enable the service so it will run automatically after the system boots.
sudo systemctl enable blink.service
To start the service without rebooting.
sudo systemctl start blink.service
To stop the service.
sudo systemctl stop blink.service
In the event you change '
sudo systemctl restart blink.service
To disable the service so it will not start after a reboot.
sudo systemctl disable blink.service