1.1 What Linux Is
Linux is not one single app. It is an operating-system ecosystem built around the Linux kernel. You meet it on servers, cloud machines, containers, Android devices, Raspberry Pi boards, and many development environments.
A three-layer mental model
At the beginning, split Linux into three layers:
- Kernel: the system core that manages CPU, memory, disks, networking, and processes.
- Distribution: a packaged operating system such as Ubuntu, Debian, Fedora, Arch, or Rocky Linux. A distribution combines the kernel, packages, defaults, and tools.
- Shell: a command interpreter such as bash, zsh, or fish. Commands you type in the terminal go to the shell first.
These words often appear together, but they are not the same thing. When you type ls, cd, or grep, you mostly interact with the shell and command-line tools. When those commands read files, start processes, or access the network, the kernel is ultimately involved.
Why developers should know Linux
Many production services run on Linux. Even if you write frontend code, Python, Java, SQL, or AI apps, you may still need to SSH into a machine, inspect logs, edit configuration, restart services, confirm ports, or diagnose permissions.
You do not need to memorize a command encyclopedia first. A better route is:
- Learn safe inspection: who am I, where am I, what files exist, what happened?
- Learn small changes: create directories, copy files, edit config, change permissions.
- Learn system diagnosis: processes, services, logs, networking, packages.
sudo, rm, chmod, chown, or curl | sh. First understand what they inspect, modify, or delete.Touch the terminal in a sandbox
The lab below does not operate on your real computer. It simulates a tiny Linux filesystem. Click commands and watch the current directory and file list change.
How a shell works
When you type:
cat README.mdthe shell splits it into "program name + arguments". The program is cat, and the argument is README.md. If the file exists in the current directory, cat prints its contents to the terminal.
That is the key to learning command lines: commands are not spells. They are precise requests to the system.
Safe commands to remember first
| Command | Purpose | Changes files? |
|---|---|---|
whoami | Show the current user | No |
pwd | Show the current directory | No |
ls | List directory contents | No |
cat file | Print a short file | No |
man command | Open a manual page | No |
mkdir name | Create a directory | Yes |
touch file | Create a file or refresh timestamp | Yes |
rm file | Remove a file | Yes |
Practice inspection commands first, and you will be much less likely to make risky changes on a server.