Your first safe terminal
Understand the prompt, identify your environment and establish a practice space.
By the end of this lesson
- Tell the shell, terminal and operating system apart
- Identify your user and Linux distribution
- Create an isolated directory for your practice work
Your environment: Bash and the named tools in a Linux lab. Minimal distributions may require extra packages. Setup help
Understand where commands run
A terminal is the window that carries input and output. A shell interprets what you type. Linux is the operating-system kernel beneath the tools. A browser displaying this lesson is not a Linux terminal: run the examples inside a Linux virtual machine or your own Linux session. WAMP hosts the website; it does not turn Windows Command Prompt into Bash.
A prompt often ends with $ for a normal account and # for root, but prompts are customisable. Check with id rather than trusting the appearance. The current directory is where relative paths begin. Before changing files, ask which machine, which account and which directory you are using.
Build a repeatable practice habit
For these lessons, use a disposable VM or an unprivileged Linux account. Take a VM snapshot before any administration exercise. Keep your work under your own home directory; do not experiment with production data or system directories. Each practical lab provides its own setup so you can restart it without completing a previous exercise.
Read a command before running it. Identify the command name, its options and its target. Commands are case-sensitive. Use local help to check what an option means on your installed version. A missing manual page usually means documentation is not installed, rather than that Linux has stopped working.
See it in context
Worked example
Read this sequence one line at a time.
pwd
id
uname -s
cat /etc/os-releasepwd prints a location, id shows account and group IDs, uname -s identifies the kernel, and os-release describes the distribution. Linux alone does not tell you which package manager to use.
Your turn
Practical lab
Create a workspace and record enough context to identify your session later.
Run commands in your own lab. This website displays instructions; the practice terminal below helps you rehearse the syntax.
1. Prepare your workspace
mkdir -p "$HOME/training4linux/first-session"
cd "$HOME/training4linux/first-session"2. Complete the task
- Confirm that id -u does not print 0; if it does, return to your normal lab account.
- Run the four identification commands above. Record the distribution NAME and your working directory.
- Use printf to create notes.txt containing one goal for your Linux learning, then display it.
3. Check your result
- pwd ends in training4linux/first-session.
- notes.txt contains your own learning goal, and cat displays it.
- You can explain why Ubuntu and Debian both report Linux from uname -s.
Need a hint?
Use printf with a quoted string and redirect its output to notes.txt.
Reveal a worked solution
Compare this with your approach after trying the task. More than one valid solution may exist.
printf "%s\n" "My goal: diagnose Linux problems confidently" > notes.txt
cat notes.txt
pwdAfter the lab: Keep notes.txt as your learning journal. No system changes were made.
Common mistakes to avoid
- Do not type the $ prompt marker when copying commands.
- If /etc/os-release is absent, consult the distribution documentation; do not infer the distribution from the kernel name alone.
Check your understanding
Knowledge check
Answer all 3 questions correctly to pass. Retry as often as you need; your best score is kept.
Your lesson progress
Not started · Best score: 0% · Attempts: 0
Practical completion is self-reported. Progress is linked to a private cookie in this browser and stored on the site. Clearing that cookie loses access to it. Manage or erase progress.