- Navigate using absolute and relative paths.
- Create and inspect a project file.
- Explain a command, argument and option.
- Identify when administrator permission is needed.
- Separate local terminal work from an SSH session.
Before you begin
Boot Raspberry Pi OS and open a terminal. Use your normal user account; this exercise does not require changing protected system files.
The terminal is another way to request work
A graphical file manager lets you open folders with a pointer. A terminal lets you request similar work using text. The shell reads your command, finds the named program and passes it arguments. Bash is a common shell on Raspberry Pi OS.
A command such as ls -l contains a program name, ls, and an option, -l, that changes its behavior. Spaces normally separate arguments. Quotation marks keep text containing spaces together. Capitalization matters in file paths and many commands.
The prompt indicates the shell is ready for another command. Tutorials sometimes display a leading dollar sign as a prompt; do not type that symbol unless the command specifically needs it. Press Enter to execute, and read the response before continuing.
Commands can be powerful because they are precise. Precision also means a typo can target a different file. Begin by inspecting where you are and what exists, especially before commands that remove or overwrite information.
Understand your location
Linux organizes files in a directory tree. The root directory is /. Your home directory contains your personal files. It is not the same as the root directory or the root administrator account.
An absolute path starts from /, such as a full path to your home folder. A relative path starts from the current working directory. The symbol . means the current directory, and .. means its parent.
Run pwd to print the current location. Use ls to list visible entries and ls -a to include names beginning with a dot. Many configuration files use such names, but hidden does not mean encrypted or safe to share.
Use cd to change directory. Running cd with no argument returns to your home directory. Pressing Tab can complete a partial path, helping you avoid typing mistakes. The up arrow recalls a previous command, but review it before pressing Enter.
Create a tiny project workspace
The following Bash sequence creates a new folder under your home directory and a short notes file. If the directory already exists, choose another name so you do not overwrite earlier notes. The > operator writes output into a file and replaces existing contents at that path.
cd
mkdir pi-terminal-practice
cd pi-terminal-practice
pwd
printf 'First Raspberry Pi notes\n' > notes.txt
ls -l
cat notes.txt
cp notes.txt notes-backup.txtmkdir creates the directory. printf produces text, which redirection saves to notes.txt. ls -l shows file details, cat prints the file, and cp creates a second copy. The quoted newline escape is interpreted by printf to end the line. No administrator permission is required inside a writable personal folder.
Expected result: The working path ends in pi-terminal-practice. The listing includes notes.txt, and cat displays First Raspberry Pi notes. The final copy produces notes-backup.txt.
Permissions and packages
File permissions describe who can read, write or execute a file. A program script needs an appropriate interpreter; it does not become trustworthy merely because it is executable. Ownership and permissions are reasons a command may be denied, but they are not instructions to grant everyone unrestricted access.
sudo asks to run a command with elevated privileges. Use it when a documented system operation requires it, such as installing packages through apt. Do not prefix every command with sudo to silence errors; that can create files your normal account cannot manage.
sudo apt update refreshes package information. sudo apt install package-name requests installation of a named package and its required dependencies. The exact package name must come from the software’s official instructions, not a guessed spelling.
Python packages add another layer. Modern Raspberry Pi OS protects its system-managed Python environment; use a project virtual environment for pip-based work, as PI05 explains. Do not follow advice that disables this protection merely to get past an installation message. Refer to Raspberry Pi OS’s Python guidance.
Processes, networks and cautious troubleshooting
A process is a running program. Some commands finish immediately; others continue until stopped. Ctrl+C requests interruption of the foreground program. It is useful for a loop you started, but should not be used casually during a software upgrade writing system files.
When using SSH, the terminal window may be on your laptop while commands execute on the Pi. Check the prompt, hostname or working directory before modifying files. exit closes the remote shell and returns you to the local one.
A network address identifies an interface in a network context. A hostname is a name that a lookup mechanism may translate to an address. If learningpi.local fails, the Pi may still be reachable by a verified local IP. Check network membership before assuming the device has stopped.
For a command you do not understand, consult man command-name or its --help option when available. The manual viewer commonly exits with q. A tutorial should explain expected output; an unexplained command copied from a forum deserves inspection before execution.
Learn removal commands later with disposable files. There is no need to delete anything to complete this lesson. Keeping the practice directory gives you a known place for the Python examples that follow.
Important terms
- Shell
- A program that interprets command-line requests.
- Argument
- Information passed to a command.
- Directory
- A container for files and other directories.
- Path
- A location in the filesystem.
- Permission
- A rule controlling access to a file or operation.
- Process
- A running program.
Mini project: Navigate and inspect without the file manager
- Run the practice sequence in a new directory.
- Return home with cd, then navigate back using the directory’s name.
- Display both files and compare their contents.
- Use ls -l to identify which account owns them.
- Finish by explaining which commands changed files and which only inspected them.
Common mistakes and debugging
- Typing the tutorial’s prompt symbol: enter the command itself.
- Using sudo for every error: determine whether location, spelling or permission caused it.
- Forgetting that > overwrites: use a new filename or inspect existing content first.
- Editing the wrong computer through SSH: identify the session before changing files.
Independent challenge
Create a second subdirectory and copy the notes into it using a relative path. Then describe the same destination with an absolute path.
Check your understanding: 10 questions
What does pwd show?
How does an absolute path differ from a relative path?
What does > do in the example?
Should sudo be used to fix every command error?
Where do commands execute during an SSH session to the Pi?
In your own words, what does “Shell” mean?
In your own words, what does “Argument” mean?
In your own words, what does “Directory” mean?
In your own words, what does “Path” mean?
In your own words, what does “Permission” mean?
Quiz answers
Reveal all 10 answers after your attempt
- The current working directory.
- An absolute path starts at the filesystem root; a relative path starts at the current directory.
- It redirects output into a file, replacing existing contents at that path.
- No. Understand the error and use elevated permission only for operations that require it.
- On the Pi, even if the terminal window is displayed on another computer.
- A program that interprets command-line requests.
- Information passed to a command.
- A container for files and other directories.
- A location in the filesystem.
- A rule controlling access to a file or operation.
Summary
The terminal becomes useful when commands, paths and permissions have clear meanings. Inspect first, work in a project directory and use administrator privileges deliberately.
Continue learning
PI05 uses this workspace to run Python and keep project dependencies organized.
- Install Raspberry Pi OS and Complete First-Time Setup
- Python Programming on Raspberry Pi
- Lists, Dictionaries, and Files in Python
- Python Libraries, pip, and Virtual Environments
Sources and further reading
Prepared 2026-09-18. Editorial draft; primary documentation consulted. Hardware build not bench-tested; code has not been executed on the reference board.