HackPath
BootcampCoursesRoadmapPracticePricing
Log inStart learning
Back to courses

Course

Terminal Mastery

0%
Foundations10 lessons
01What Is a Shell?
12m
02CLI vs GUI — Two ways to interact with a computer
14m
03Move around — cd, pwd, and ls
18m
04Create, copy, move, delete
20m
05Linux Filesystem Tree — Everything Is a File
16m
06What Is Bash?
15m
07Popular Shells — Bash, Zsh, Fish, and sh
16m
08Completion and Keyboard Shortcuts — Type Less, Do More
18m
09Finding Files — find and locate
20m
10Configure Bash — Your working environment
18m
Linux Basics8 lessons
11What is scripting?
16m
12Linux Permissions — Read, Modify, and Understand Access Rights
22m
13stdin, stdout and stderr — The Three Data Streams
16m
14Redirect output — > and >>
16m
15Redirect input — <
14m
16Pipes — Connecting Commands Together
20m
17Redirect stderr — Handling errors in your pipelines
18m
18Advanced pipelines and recap
20m
Streams and Text Processing6 lessons
19grep — Filter and Search in Text
20m
20sed — Transform text on the fly
20m
21awk — Processing Structured Data
22m
22sort, uniq, and wc — Sort, deduplicate, and count
16m
23cut, paste and join — Working with columns
16m
24tr — Transforming Characters
14m
Text Editors6 lessons
25Choosing your editor — nano, vim, and the others
12m
26nano — The Accessible Editor
14m
27vim — Understanding Modes
18m
28vim — Movements, Operators, and Search
20m
29vim — Registers, Macros, and Windows
20m
30Configure your editor — .vimrc and .nanorc
14m
Scripting Bash6 lessons
31Variables and Types in Bash
18m
32Operators and Arithmetic in Bash
16m
33Conditions — if, elif, else and case
18m
34Loops — for, while, and until
20m
35Functions — Organize and reuse code
18m
36Debugging and script robustness
18m
Processes and Scheduling6 lessons
37Understanding Linux processes
16m
38ps and top — Observing processes
18m
39Job control — fg, bg, nohup, and screen
18m
40cron and at — Scheduling tasks
18m
41kill, nice and renice — Control Priorities
14m
42lsof, fuser, and Summary — Inspect Resources
16m
Networking6 lessons
43Ping, traceroute and network diagnostics
16m
44curl and wget — Interacting with the web
20m
45SSH — Secure remote connections
22m
46rsync — Smart file synchronization
18m
47ss, netstat, and nmap — Inspect the network
18m
48nc, tcpdump, and Network Summary
16m
System Administration6 lessons
49apt and yum — Package Management
18m
50tar, gzip and zip — Managing Archives
16m
51df, du, mount and lsblk — Disks and storage
16m
52systemd and journalctl — Managing Services
18m
53Advanced Users, Groups, and Permissions
18m
54Final Synthesis — Your Reference Workflow
20m
Lesson 01·1 / 54·12 min

What Is a Shell?

Distinguish terminal, shell and kernel; read supplied command results without treating SHELL as proof of the active interpreter.

EnglishFrançaisDeutschالعربيةहिन्दी

Starting point and question.

A terminal window is open. A note says /bin/zsh, but a process report says bash. Which program is interpreting the command, and what can each source prove?

I ask you to write TM-S01-R using the supplied fictional case. You will identify four roles, compare a variable with a process report, and state what remains unknown. Paper or an existing editor is enough; no installation, account or previous terminal experience is needed.

Separate the roles before the commands.

RoleMeaning in this lesson
TerminalA program that accepts keyboard input and displays text. It can host different shells.
ShellA command interpreter: a program that reads command-language instructions and carries them out.
Operating systemSoftware providing the services programs use; it includes a kernel and other parts.
KernelThe core that manages resources such as memory, processes and access to devices. A process is a running program instance.

The terminal passes input to the program connected to it and displays output. A shell can run an internal command (builtin) itself, or start an external program. In Bash, echo is normally internal; uname is normally external. The kernel does not interpret shell syntax or compose every displayed result. Programs can write output directly to the terminal; it need not travel back through the shell.

A system call is a controlled request a program makes for a kernel service, not a human-language command. “Person → terminal → shell → program/kernel” is only a simplified model. An internal command need not start a separate external program. Shells also run scripts, files containing instructions; scripting is taught later.

Read TM-S01 one source at a time.

Fictional case, 2026-10-19, UTC+02:00. G1 at 09:00: read four excerpts from one declared Bash session on lab-shell. No real connection or system change is requested. lab-shell is a fictional system name, not an address to contact. The blocks display supplied commands and outputs; they do not execute them.

A command is an instruction; an argument supplies a value and an option selects behavior, often beginning with a hyphen. A prompt is the text indicating readiness to accept input; do not copy a displayed prompt marker with the command.

R1, 09:01: read a variable, not a verdict.

A variable associates a name with a value. echo displays text; $SHELL asks the shell to substitute the value named SHELL. Double quotes keep that value together as one argument and are not printed.

Terminal
echo "$SHELL"
Command shown
/bin/zsh
Fictional output

R1 reports /bin/zsh, a path, the location/name of a program in the file tree. SHELL commonly describes a login-shell setting and can be inherited or changed. This value alone does not identify the current interpreter. A blank result would not prove that no shell exists.

R2, 09:02: inspect the session's process.

A PID (process identifier) is a number identifying a process. In this Bash/Zsh interactive use, $$ supplies the shell process ID. ps reads process information; -p selects that ID and -o comm= requests the command name with no column heading.

Terminal
ps -p "$$" -o comm=
Command shown
bash
Fictional output

R2 reports bash for that selected process. Together with the declared session, it supports Bash here, even though R1 says /bin/zsh. Output may include a path on another system. This is a scoped process observation, not proof of the exact executable version or that the terminal application is Bash. H1 “a child Bash was started from Zsh” is plausible but not established by these excerpts.

R3, 09:03: read the kernel name.

uname reports system information; -s requests the kernel/implementation name.

Terminal
uname -s
Command shown
Linux
Fictional output

Linux names the kernel in this supplied session. It does not identify the terminal application, the precise Linux distribution, or the physical computer running the browser. A remote session or a Linux environment on a Windows host can differ from the machine displaying the terminal.

R4, 09:04: read a longer system summary.

The -a option asks uname for a broader summary. This line is illustrative, not a real release to install.

Terminal
uname -a
Command shown
Linux lab-shell 6.8.0-demo #1 SMP x86_64 GNU/Linux
Fictional output

Here Linux is the kernel name, lab-shell the node name, 6.8.0-demo the kernel release, #1 SMP version information, x86_64 a reported machine type and GNU/Linux the GNU utility's operating-system label. Architecture describes a machine/instruction family, not an identity or guaranteed physical hardware. Field availability differs between systems; -a is not a full inventory or an exact distribution detector. Do not assume each whitespace-separated word is a separate fixed field.

Compare conclusions with sources.

A useful TM-S01-R says: “R1 holds /bin/zsh; R2 reports bash for the selected session process; R3 reports Linux; R4 adds system information. The terminal application, exact distribution and reason for the mismatch remain unknown. H1 is unverified.”

Check three criteria: K1, name terminal, shell, operating system and kernel separately; K2, distinguish the value in R1 from R2's process report; K3, keep R3/R4 scoped and state unknowns. This checks your explanation, not mastery of Linux.

Bash means Bourne Again Shell and is this course's reference shell, not a universal requirement. Zsh (Z shell), fish (friendly interactive shell) and sh are other shell names; their languages are not interchangeable. Windows Terminal is a terminal host and PowerShell is a different shell. Later lessons develop these distinctions.

Optional reading on your own existing session.

The supplied case is enough. If you already know you have an interactive Bash or Zsh session on Linux or macOS, you may type the four input lines above one at a time and press Enter after each. No directory or file preparation is needed. These commands read a variable and system/process information; they do not change settings.

Keep your actual outputs separate from TM-S01, with the session, command and source. Do not change SHELL to make it match the example. Darwin is a possible uname result on macOS. If a command is unavailable or denied, keep the error and stop that check; no administrator privileges or installation are needed. On native PowerShell/cmd, do not paste this Bash/Zsh syntax: use the supplied case instead. An existing Linux session on Windows is a separate environment, not proof of native Windows behavior.

The associated Foundations challenge includes file operations and later prerequisites. Return to it after the relevant lessons; it is not a prerequisite for this explanation.

Sources: GNU shell role, builtins, SHELL, uname, ps. Local system manuals cover platform differences.

Exercises

Exercise 1: Which source identifies which role?.

Fictional TM-S01, 2026-10-19 UTC+02:00: G1 09:00 reading only, declared Bash session lab-shell. R1 09:01 echo "$SHELL" gives /bin/zsh; R2 09:02 ps -p "$$" -o comm= gives bash; R3 09:03 uname -s gives Linux; R4 09:04 uname -a gives Linux lab-shell 6.8.0-demo #1 SMP x86_64 GNU/Linux. SHELL is a variable value, ps reports a selected process and uname system information. No real execution required.

Write TM-S01-R in 2–5 minutes. Explain why R1/R2 can differ, what R2 supports and why H1 “Bash started from Zsh” remains unverified. Apply K1 roles, K2 variable/process, K3 scoped system information and unknowns.

Exercise 2: What does uname establish?.

Fictional TM-S01, 2026-10-19 UTC+02:00: G1 09:00 reading only, declared Bash session lab-shell. R1 09:01 echo "$SHELL" gives /bin/zsh; R2 09:02 ps -p "$$" -o comm= gives bash; R3 09:03 uname -s gives Linux; R4 09:04 uname -a gives Linux lab-shell 6.8.0-demo #1 SMP x86_64 GNU/Linux. SHELL is a variable value, ps reports a selected process and uname system information. No real execution required.

Correct “R3 proves the browser computer runs this exact Linux distribution; R4 identifies a physical machine and the terminal.” Use K1 roles, K2 source types, K3 unknowns. Explain the parts of R4 using the supplied model.

Exercise 3: Explain the path of a command.

Fictional TM-S01, 2026-10-19 UTC+02:00: G1 09:00 reading only, declared Bash session lab-shell. R1 09:01 echo "$SHELL" gives /bin/zsh; R2 09:02 ps -p "$$" -o comm= gives bash; R3 09:03 uname -s gives Linux; R4 09:04 uname -a gives Linux lab-shell 6.8.0-demo #1 SMP x86_64 GNU/Linux. SHELL is a variable value, ps reports a selected process and uname system information. No real execution required.

Explain terminal, shell, operating system and kernel in your own words. Explain why internal echo and external uname need not follow the same execution path. Keep K1–K3 and identify one unknown. K1 checks the four roles, K2 variable versus process and K3 the limits of uname and unknowns.

Flashcards

Flashcards · 1/5
0001
0001
Unseen

Terminal or shell?

0001
0001

Answer

The terminal handles text input/output; the shell interprets a command language. They are different programs.

Next, compare command-line and graphical interfaces by the task and its constraints, without assuming either is always better.

Chapter challenge

Follow the activity instructions and keep your own results.

Open challenge →

You're on a free lesson

Ready to go further?

Unlock all courses, exercises, real-world scenarios and flashcards — everything to build real skills.

Unlock full access →

No commitment · Cancel anytime

Sign in to track your progress.

Sign in to validate →

53 lessons locked in this course · 800+ students enrolled

$99/year — save 31% vs monthly

Unlock full access →