How to run a script at boot automatically

From KoanSoftware Wiki
Revision as of 14:51, 19 July 2017 by Koan (talk | contribs) (Created page with "== 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 Syst...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, 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