By Kevin McAleer, 9 Minutes
Page last updated November 24, 2026

Ahoy there makers! By the end of this lesson you will be able to explain what the command line is, why it is worth learning, and open a terminal on your Raspberry Pi.
Kev made a video that walks through the terminal on Raspberry Pi OS. Watch it first, then come back and let’s get typing.
Almost every cool thing you will do with a Raspberry Pi, from running a robot’s brain to hosting a web service, ends up with someone typing a command. The command line is a text window where you tell the computer what to do, one line at a time. It looks plain, but it is fast, precise, and works just as well over a network cable from the other side of the house as it does on the Pi’s own screen.
In this course we learn it by doing one real job: setting up and tidying a Raspberry Pi so it is ready to run Docker. Every lesson adds one piece. We make a tidy home for our projects, look after the users and permissions, install and update software safely, keep an eye on the Pi’s health, run a service, log in from another computer, and finish with a script that checks on the Pi for us.
flowchart LR
A["Find your way around"] --> B["Files and folders"]
B --> C["Permissions and users"]
C --> D["Install software with apt"]
D --> E["Processes and services"]
E --> F["Networking and SSH"]
F --> G["Scripts and Git"]
G --> H["A Pi ready for Docker"]
man, and moving around the filesystemsudo, and who is allowed to do whatchmod and chownaptsystemctlpi-checkup.sh script that reports on your PiAfter completing this course, you will be able to:
aptsystemctlYour Pi’s first user is whatever name you chose in Raspberry Pi Imager. This course writes pi or YOURNAME in examples, so swap in your own username, which you can always check by typing whoami.
Command, then output. Each command appears in a code box, followed by the sort of output you should see. Your numbers and names will differ a little, and that is fine.
Try things safely. Anything that deletes, overwrites or needs sudo is flagged with a Careful note, and we practise on throwaway files first.
Quizzes and exercises. Each lesson ends with Try it Yourself exercises, a Common Issues list and a short quiz. Your quiz score is kept in your browser and shown in the sidebar.
One Pi, one thread. Each lesson finishes with a line called Pi progress so you can see how close you are to a Docker-ready Pi. When you finish, the Docker course is the natural next step.
Prerequisites. None. This is the first course in the Homelab learning pathway.
Teachers: this course suits learners aged about 11 and up, and adults who are new to Linux. Allow 30 to 45 minutes per lesson, and about 90 minutes for the final project (lessons 16 and 17). Each learner or pair needs a Pi with a keyboard, screen and network. Lessons 0 to 5, 12 and 13 can be done on any Linux, macOS or WSL terminal if you have no Pi. Lessons that use
sudo, add users or install software change the system, so use a Pi your class owns and re-image the card afterwards. Shared school networks often block SSH (port 22) and the apt mirrors, so test lessons 6 and 10 before the class.
The command line is a text-based way of talking to the computer. Instead of clicking icons, you type a command and press Enter. The program that reads your typing is called the shell (on Raspberry Pi OS it is bash), and the window it runs in is the terminal.
Why bother, when there is a perfectly good desktop?
When you open the terminal you will see a prompt, a short line that says the shell is ready. After you type a command and press Enter, the shell runs it and prints the output.

A typical prompt looks like this:
pi@raspberrypi:~ $
Read it from left to right: pi is your username, raspberrypi is the name of the computer, ~ is the folder you are in (the tilde means your home folder), and $ says you are a normal user. If you ever see # instead, you are the all-powerful root user, so take extra care.
Ctrl + Alt + T. If nothing happens, use the menu. On a desktop with the taskbar, there is also a terminal icon you can click.
Let’s type our first commands (you type the part after the $, and the Pi prints the rest). whoami prints your username and hostname prints the name of the Pi:
$ whoami
pi
$ hostname
raspberrypi
You just talked to your Pi. That is the whole idea, and everything else in this course is a variation on it.
Ctrl + Alt + T.date and press Enter. Then type uname -m to see whether your Pi is running a 64-bit system (aarch64) or a 32-bit one (armv7l).echo "Hello, I am $(whoami) on $(hostname)" and work out why it prints your own username and Pi name.command not found.LS and ls as different commands.Why: The shell looks for a program with exactly that name and finds none.
Enter. It is working.Quick quiz 1 of 4
What is the program called that reads the commands you type?
Quick quiz 2 of 4
In the prompt pi@raspberrypi:~ $, what does the ~ mean?
/home/pi.Quick quiz 3 of 4
Which keyboard shortcut opens a terminal on the Raspberry Pi desktop?
Quick quiz 4 of 4
Why is the command line useful for a Pi with no screen attached?
Pi progress: you have a terminal open and know how to read the prompt. Next, a quick lesson on how to get help without leaving the terminal.
Comments