xxxxxxxxxx
sudo nano /etc/systemd/system/myscript.service
xxxxxxxxxx
crontab -e // To make a crontab file
@reboot *your shell command here* // to run at startup
xxxxxxxxxx
$ sudo systemctl list-unit-files --type=service
[sudo] password for user:
UNIT FILE STATE
accounts-daemon.service enabled
apparmor.service enabled
apport-autoreport.service static
apport-forward@.service static
apport.service generated
apt-daily-upgrade.service static
apt-daily.service static
atd.service enabled
autovt@.service enabled
blk-availability.service enabled
bootlogd.service masked
bootlogs.service masked
bootmisc.service masked
checkfs.service masked
checkroot-bootclean.service masked
checkroot.service masked
cloud-config.service enabled
cloud-final.service enabled
cloud-init-local.service enabled
cloud-init.service enabled
console-getty.service disabled
##### snipped #####
xxxxxxxxxx
$ sudo systemctl enable mysql
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mysql
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.