- Go to
/etc/systemd/system/
cd /etc/systemd/system
- Create a new text file with .service extension and edit it
sudo touch myservice.service
- Enter the barebones essential syntax into the file using your favorite text editor
[Unit]
Description=Description of myservice
[Service]
ExecStart=/path/to/shell/file
[Install]
WantedBy=multi-user.target
- Enable the newly created service using systemctl
sudo systemctl enable myservice.service