Raspberry Pi execution on power on.

Zarkoff

May 18, 2024
2
Joined
May 18, 2024
Messages
2
How does one start a Raspberry Pi 4 program executing when the power is turned on? That is, without using wifi, or a terminal command, just turning on the robot power.
I've tried searching the Internet but obviously not using the correct search terms, or not understanding the threads.

Many thanks,
 

Delta Prime

Jul 29, 2020
2,987
Joined
Jul 29, 2020
Messages
2,987
I've tried searching the Internet but obviously not using the correct search terms
Well let's see, I searched quoting your query...
Raspberry Pi 4 program executing when the power is turned on?
Add commands to the file rc.local to run a program when the Pi boots. This is useful for headless mode, where the Pi is powered up without a monitor, and runs a program without configuration.
:p
 

Zarkoff

May 18, 2024
2
Joined
May 18, 2024
Messages
2
Yes, I tried that. I followed some detailed instructions by modifying the rc.local file, but it didn't work for me.
I was hoping someone who had already done this could show me, in detail, what worked. I now find that rc.local
is no longer recommended but something called systemd is preferred, I'll try that.

Thanks,
 
Last edited:
Top