Auto running a script Create the script Create a folder to store the script in mkdir ./bin cd ./bin Create the script using the nano text editor sudo nano script_auto_run In the nano editor, type this script: #!/bin/bash # Script to start our application echo "Doing autorun script..." sudo /home/pi/projects/my_project.a & Replace "sudo /home/pi/projects/my_project.a &" with the commands you want carried out. The "&" means do the command in the background. Note that when executing a command without logging is as a user you can't depend on any path or environment variables so you must provide full paths to everything. Save it by pressing Ctrl+X, " Y", ENTER This script needs to be made executable by typing this : sudo chmod 755 script_auto_run You can test the script works by typing /home/pi/bin/script_auto_run Setting it to be run To launch the script at start-up edit the “rc.local” file needs to be edited. sudo nano /etc/rc.local Add the following line: /home/pi/bin/script_auto_run Save it by pressing Ctrl+X, " Y", ENTER Re-boot your RPi and it will run.