To start a script when the [[Raspberry Pi]] is initialized, do the following:
- Open the startup configuration file
`` `Bash
SUDO NANO /ETC/RC.LOCAL
`` `
- Add the following line to the document before section `exit 0`:
`` `Bash
CD/Path/To/Your/Script # Command to Navigate to your script
<Command> # Command to execute in the specified location
`` `
- Save the file by pressing `ctrl+x`, then` y`, finally `enter`. Restart [[Raspberry Pi]] and make sure the script is working.
:: ** Reference: ** :: [Official Raspberry PI website] (https://www.raspberrypi.com/)
cd ./home/lab/desktop/rasp-top
Sudo Python app.py &