125
- Prepare the script, and chmod with run permission
- Edit (or create) /etc/rc.local file
- If this is new create, add shebang line at the top, #!/bin/bash
- Add the path of script in the rc.local file
- If this is new create, chmod 755 for the rc.local file
- Reboot the ubuntu to test.
Refer: https://askubuntu.com/questions/814/how-to-run-scripts-on-start-up