In one minute
- Linux is an operating system, like Windows or macOS. It is free, open source, and runs most of the world's servers.
- Almost every server you will touch as a DevOps engineer runs Linux: cloud servers on AWS, Azure and GCP, every Kubernetes node, nearly every Docker image, and the runners that execute your GitLab CI/CD jobs. Being comfortable in a Linux terminal is the single most useful skill in this field. Everything else in this course builds on it.
- You type commands into a terminal. A program called the shell reads them and asks the kernel (the core of Linux) to do the work.
- 👉 Every day: logging in to servers, debugging containers, writing pipelines and automating tasks.
Think of it like: a restaurant. You (the user) give your order to the waiter (the shell). The waiter passes it to the kitchen (the kernel), which does the real work with the equipment (the hardware).
Why it matters on the job
- Servers have no desktop. You manage them over SSH by typing commands. There is no mouse and no window to click.
- Containers are Linux. A Docker container is just a Linux process with extra walls around it. When a container misbehaves, you debug it with Linux tools.
- Automation is shell commands. CI/CD pipelines, Dockerfiles and Ansible playbooks are, underneath, Linux commands run in order.
- Interviews test it. Almost every DevOps and SRE interview asks things like "a server is slow, what do you check first?"
The kernel, the distribution and the shell
Linux has three layers you should be able to explain:
| Layer | What it is | Example |
|---|---|---|
| Kernel | The core program that talks to the hardware, runs programs and manages memory | Linux 6.8 |
| Distribution | The kernel plus tools, a package manager and default settings, packaged together | Ubuntu, RHEL, Amazon Linux, Alpine |
| Shell | The program that reads the commands you type | Bash, Zsh, sh |
Strictly speaking, Linux is only the kernel. When people say "a Linux server", they mean a distribution running on that kernel.
Think of it like: a car. The kernel is the engine. The distribution is the whole car built around it (Ubuntu and RHEL are different car brands with the same kind of engine). The shell is the steering wheel you use to drive.
Distributions you will meet
👉 You need to know which one you are on, because a few commands differ (mostly installing software and firewalls).
| Distribution | Family | Package manager | Where you see it |
|---|---|---|---|
| Ubuntu | Debian | apt | Cloud servers, developer laptops, CI runners |
| Debian | Debian | apt | Servers, many official Docker images |
| RHEL, Rocky, AlmaLinux | Red Hat | dnf / yum | Banks, telecoms, large companies |
| Amazon Linux 2023 | Red Hat style | dnf | AWS EC2 and EKS nodes |
| Alpine | Independent | apk | Very small Docker images |
The commands in this course work on all of them. Where they differ, the lesson shows both.
Your first commands
Three commands that tell you where you are.
👉 The first thing to run every time you log in to a new machine.
Open the practice terminal on the right, type each command, then press Enter.
whoamihostnameuname -alynuxprolabLinux lab 6.8.0-49-generic #49-Ubuntu SMP x86_64 GNU/Linuxwhoamiprints the user you are logged in as.hostnameprints the machine's name.uname -aprints kernel details: the kernel name, machine name, kernel version and CPU type (x86_64means 64-bit Intel or AMD).
Find out which distribution you are on:
cat /etc/os-releaseNAME="Ubuntu"VERSION="24.04 LTS (Noble Numbat)"ID=ubuntuThis file exists on every modern distribution. It is the quickest answer to "what OS is this?"
Reading the prompt
When the shell is waiting for you, it shows a prompt:
lynuxpro@lab:~$| Part | Meaning |
|---|---|
lynuxpro | Your username |
lab | The machine's name |
~ | The folder you are in. ~ means your home folder, /home/lynuxpro |
$ | You are a normal user. A # here means you are root, the all-powerful admin |
Why it matters: Always glance at the prompt before running something risky. Seeing #, or a production machine name, is your cue to slow down.
Remember it:
$= normal you.#= root: be careful.
How a command is built
Most commands follow the same pattern:
command -options argumentsls -l /var/log- Options (also called flags) change how the command behaves. Short options use one dash (
-l) and can be joined together (-lais-lplus-a). Long options use two dashes (--all). - Arguments are what the command works on, such as a file or folder.
Think of it like: a sentence. The command is the verb ("list"), the options are adverbs ("in long format"), and the argument is the object ("the /var/log folder").
ls -la /etcGetting help
Nobody memorises every option. Professionals look things up all the time.
👉 Any time you forget an option or meet a new command.
helpOn a real server you also have:
man ls # the full manual page (press q to quit)ls --help # a short summary of optionsReal-world scenario
You join a new team and get SSH access to a server called orders-prod-3. Before touching anything, you run:
whoamihostnameuname -acat /etc/os-releaseuptimeIn five seconds you know who you are, which machine you are on, its OS and kernel version, and how long it has been running. Experienced engineers do this every time they log in somewhere new.
Common mistakes
- Typing commands in capitals. Linux cares about case:
LSis notls, andNotes.txtis a different file fromnotes.txt. - Working as root all the time. Use a normal user, and
sudoonly for the commands that need it. - Ignoring the prompt. Many outages start with "I thought I was on staging".
Practice
- Run
whoami,hostnameanduname -a, and explain each line of output out loud. - Use
cat /etc/os-releaseto find the distribution name and version. - Run
ls -lain your home folder and find which entries are hidden (their names start with a dot). - Type
helpand pick two commands you have not used yet. Try them.
Cheat sheet
| Command | What it does |
|---|---|
whoami | Show your username |
hostname | Show the machine's name |
uname -a | Show the kernel and CPU type |
cat /etc/os-release | Show the distribution and version |
uptime | Show how long the machine has been running, and how busy it is |
clear | Clear the screen (or press Ctrl+L) |
Key takeaways
- Linux runs almost every server, container and CI runner, so it is a DevOps engineer's main tool.
- Linux is really the kernel. Ubuntu, RHEL and Alpine are distributions built around it.
- You type commands into the shell, and the kernel does the work.
- The prompt tells you who you are, where you are, and whether you are root (
#). - A command is: command + options + what to work on. Use
manor--helpwhen you forget.