Linux course index · Linux Basics category · Lesson 1 of 8
AI disclosure — AI-generated content, posted as is. AI can make mistakes. This lesson draws on the linked Open Education posts and adds original explanations or lab examples where useful. The newly written explanations and examples may be freely reused. Linked source material retains its own terms.
Learning goal
Tell the kernel, distribution, terminal, and shell apart, then identify the system you are actually using.
Concepts and setup
The kernel manages hardware and gives programs access to resources such as files, memory, and processes. A distribution bundles the kernel with tools, software repositories, and defaults. The terminal is the interface you type into. Bash is one shell the terminal can run. Linux command names and paths are case-sensitive in an ordinary Linux lab filesystem.
Use an ordinary user in a disposable Linux VM for this series. Take a snapshot before the administration labs. Prefer a VM over a container for lessons on boot, devices, or kernel policies. Windows users may use WSL for many Basics exercises, but networking and service behavior can differ.
Inspect your shell and operating system
printf 'User: %s\n' "$(id -un)"
printf 'Kernel: %s\n' "$(uname -s)"
grep '^PRETTY_NAME=' /etc/os-release
printf 'Shell process: %s\n' "$(ps -p "$$" -o comm=)"
type cd
pwd
command -v grep
Possible output
User: learner
Kernel: Linux
PRETTY_NAME="Ubuntu 24.04.2 LTS"
Shell process: bash
cd is a shell builtin
/home/learner
/usr/bin/grep
The distribution line and paths are illustrative. Run the shell-process line directly in Bash. The SHELL variable often names the login shell, which need not be the one you are currently using.
Choose the right help tool
help cd | head -n 3
grep --help | head -n 2
man -w grep
Possible output
cd: cd [-L|[-P [-e]] [-@]] [dir]
Change the shell working directory.
Usage: grep [OPTION]... PATTERNS [FILE]...
/usr/share/man/man1/grep.1.gz
The display is abridged. The site’s help post distinguishes help for shell builtins, man for installed manual pages, and info for GNU manuals when installed.
Questions only
Quick-check questions
- Is Bash the Linux kernel?
- When would you use help cd rather than grep –help?
Assessment questions
- Collect three lines of evidence distinguishing the user, kernel, and distribution.
- Why can a VM run the service labs more faithfully than a minimal container?
- You opened a Bash subshell from a different login shell. Which command inspects the running shell?
Questions and answers
Quick-check answers
- Is Bash the Linux kernel?
Answer — No. Bash is a user-space program that interprets commands. - When would you use help cd rather than grep –help?
Answer — Use help cd for the Bash builtin. grep –help documents the external grep program.
Assessment answer key
- Collect three lines of evidence distinguishing the user, kernel, and distribution.
Answer — Use id -un, uname -s, and grep ‘^PRETTY_NAME=’ /etc/os-release. Record the outputs separately. - Why can a VM run the service labs more faithfully than a minimal container?
Answer — A VM normally boots its own kernel and init system and presents virtual hardware. A container ordinarily shares a host kernel. - You opened a Bash subshell from a different login shell. Which command inspects the running shell?
Answer — Use ps -p "$$" -o comm= in the interactive subshell.
Source articles on this site
- 20 mixed quiz questions Intro to Linux
- History of Linux
- man vs info vs help
- Understanding Host-Only Networking in Oracle VirtualBox: Concepts, Tools, IP Addressing, DHCP, and Practical Options
Continue the course
Next lesson 02 — Paths, Files, and Links.
Linux course index · Linux Basics category · Lesson 1 of 8
