- ✕This summary was generated using AI based on multiple online sources. To view the original source information, use the "Learn more" links.
Running a program from the command line on Raspberry Pi is straightforward once you know the correct command and path. This works for both compiled executables and scripts.
Running a Program in the Current Directory
If your program is in the current directory and not in your $PATH, you must prefix it with ./:
/myprogramCopied!✕CopyMake it executable first:
chmod +x myprogramCopied!✕CopyThis tells the shell to execute the file located in the current directory (.).
Running a Program from Anywhere
If you want to run it without ./, place it in a directory included in your $PATH (e.g., /usr/local/bin or ~/bin):
mv myprogram ~/bin/Copied!✕CopyEnsure ~/bin exists; if not, create it:
mkdir ~/binCopied!✕CopyLog out and back in (or run source ~/.profile) so that ~/bin is added to your $PATH.
Launching Installed Applications
For installed programs, simply type their name:
nanopython3htopCopied!✕CopyIf unsure of the command name, use:
which <program>Copied!✕Copyto find its location.
Launching GUI Applications from Terminal
For graphical programs, run:
chromium-browser &Copied!✕Copy Five Ways To Run a Program On Your Raspberry Pi At Startup
How to Auto Start a Program on Raspberry Pi? (4 Ways)
- Use the crontab. Cron is a service, automatically started at each boot of the Raspberry Pi, which …
- Put your script in /etc/init.d. The second solution you can use is to create your script under …
- Create an upstart job. The third option is to create an upstart job. In the previous Raspberry Pi OS …
- Add a line in /etc/rc.local. Finally, the rc.local method is probably the easiest as you just need to …
How to Auto Start a Program on Raspberry Pi? (4 ways) …
Apr 29, 2026 · On Raspberry Pi OS Lite, the easiest solution to start automatically a program on boot is to use the crontab with the @reboot event. On Desktop, the …
Autostart Programs on Raspberry Pi Easily
Sep 21, 2025 · When using the command line, there are several different ways we …
- Software: rc.local, systemd, crontab, GNOME Tweaks
- System: Raspberry Pi
Working with the command line - The Raspberry Pi Guide
Working with the command line You will likely be using the command line a lot when working with Raspberry Pi’s. Below I provide a concise list of the …
Automating Raspberry Pi: How to Autostart Programs
Jan 14, 2026 · This guide will walk you through five reliable methods to autostart programs on Raspberry Pi, tailored to different use cases (e.g., CLI tools, GUI apps, services with network …
How to run a program on Raspberry Pi: A beginner’s guide
Whether you’re new to Raspberry Pi or looking for different ways to execute programs, this guide will walk you through the easiest methods to run software …
Launch program from command line? - Raspberry Pi Forums
Sep 1, 2014 · Once you've finished testing your program, you copy the executable to ~/bin. After that, that one can execute it just by giving the name of the program, no matter what the current working …
How to Run a Raspberry Pi Program on Startup
We'll use this program when we want to demonstrate how to start a program on boot that requires the X windows system (for example, you want to make a …
How to Execute a Script at Startup on the Raspberry Pi
Watch full videoFeb 19, 2026 · This wikiHow teaches you how to force a script to start at boot time by either adding it as a service (before the desktop loads), or by adding it to your autostart file (after the desktop loads).
Deep dive into Raspberry Pi Command Line to Start a Program