[wd_asp elements=’search’ ratio=’100%’ id=1]

Auto start/boot a program raspberry pi .bashrc

18th March 2018

Raspberry-Pi

Raspberrypi - Codehaven

Auto start a program on boot
.bashrc method
This will run on boot and also every time when a new SSH connection is made. Put your command at the bottom of ‘/home/pi/.bashrc’.

sudo nano /home/pi/.bashrc

Go to the last line of the script and add:

echo Hello I am running at boot
sudo python /home/pi/mysample.py