Essential Linux Commands for Raspberry Pi
A short, practical list of the commands you'll type constantly — enough to navigate, inspect, and manage files confidently.
You don't need to memorize a large command set to be productive — a small, well-understood core covers the large majority of everyday terminal work:
| Command | What it does |
|---|---|
pwd | Print the current directory you're in |
ls | List files in the current directory (ls -la shows hidden files and details) |
cd folder | Change into a directory (cd .. goes up one level) |
mkdir name | Create a new directory |
nano file.py | Open a simple, beginner-friendly text editor for that file |
python3 file.py | Run a Python script |
sudo command | Run a command with administrator privileges (needed for system changes) |
Ctrl+C | Stop whatever's currently running in the terminal |
Two habits worth building early: tab completion — start typing a file or folder name and press Tab to auto-complete it, which both saves typing and avoids typos — and reading error messages fully rather than skimming past them; Linux command-line errors are usually specific about exactly what went wrong and where.
sudo deserves a note of caution: it temporarily grants a command full administrative power over the system, which is necessary for some setup tasks (like the ones in the next lesson) but also means a mistyped destructive command run with sudo has no safety net. Use it deliberately, not as a reflex whenever a command fails.