Search code examples
pythonlinuxraspberry-pioperating-systemraspbian

Run bash or python script at startup raspbian


i want to asking about :

i have a python script send data to Mysql, so i need to run this script on the startup of my OS. the script path : /home/pi/Desktop/data.py

Any help?


Solution

  • Add your command to your .bashrc, and it will run as your OS startup.

    echo "python /path/script" >> ~/.bashrc