When using Ubuntu, user-defined tasks can be performed by executing a script at startup and shutdown. Each of these scripts is a little particular and requires subtle modifications in order to include additional commands. This article will show you how to execute scripts upon startup, reboot, and shutdown on an Ubuntu system.
Note: Scripts are run in the alphabetical order in directories, and all scripts should be named following Linux's nomenclature rules. Only then will they run properly.
/etc/rc.local, and add your commands.
exit 0.
/etc/rc0.d. Be sure to make the script executable by using
sudo chmod +x myscript.
K99to run at the right time.
/etc/rc6.dand make it executable through
sudo chmod +x myscript.
K99in order to run properly and at the right time.