How to run a script at boot automatically
Jump to navigation
Jump to search
How to run a script at boot automatically using Linux
If you need to run a script at boot automatically using Linux, this is the easiest solution. this covers only System V behaviour and of course doesn't cover the various aspects of different runlevels nor the service kill at shutdown.
- Create a script file
# vi /etc/init.d/rc.local
- Modify the executable flag
# chmod +x /etc/init.d/rc.local
- Modify the executable flag
# update-rc.d rc.local start 99 5 .
- If you want to remove the service
# update-rc.d -f rc.local remove