Home ยป Execute a script while start up the ubuntu

Execute a script while start up the ubuntu

0 comment 125 views
  1. Prepare the script, and chmod with run permission
  2. Edit (or create) /etc/rc.local file
  3. If this is new create, add shebang line at the top, #!/bin/bash
  4. Add the path of script in the rc.local file
  5. If this is new create, chmod 755 for the rc.local file
  6. Reboot the ubuntu to test.

Refer: https://askubuntu.com/questions/814/how-to-run-scripts-on-start-up

Leave a Comment