How to Run a Terminal Command at Startup on Raspberry Pi?

0
11
Asked By CuriousCoder42 On

Hey everyone! I'm new to Linux and currently using Raspberry Pi OS on my Raspberry Pi. I want to set up a script that automatically runs a specific terminal command when the OS starts. The command is `rpicam-still -t 0`, which uses the Raspberry Pi Camera module to show its viewfinder. I've tried using crontab, but most examples I found seem to be for actual programs and not just terminal commands. I also gave the `rc.local` file a shot to run the command on startup, but that didn't work either. I'm feeling stuck and could really use some help figuring out where I'm going wrong or what my next steps should be.

1 Answer

Answered By TechieTurtle88 On

It sounds like `rpicam` should run as a standalone program. Have you tried directly executing it in a terminal session? If it's not working with cron, you can run your command in a bash script and set that script to execute at boot with crontab.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.