Skip to content
$ lynuxpro
← Linux

LESSON 1 OF 26 · BEGINNER · 13 MIN

What is Linux and why DevOps runs on it

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:

LayerWhat it isExample
KernelThe core program that talks to the hardware, runs programs and manages memoryLinux 6.8
DistributionThe kernel plus tools, a package manager and default settings, packaged togetherUbuntu, RHEL, Amazon Linux, Alpine
ShellThe program that reads the commands you typeBash, 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).

DistributionFamilyPackage managerWhere you see it
UbuntuDebianaptCloud servers, developer laptops, CI runners
DebianDebianaptServers, many official Docker images
RHEL, Rocky, AlmaLinuxRed Hatdnf / yumBanks, telecoms, large companies
Amazon Linux 2023Red Hat stylednfAWS EC2 and EKS nodes
AlpineIndependentapkVery 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 -a
SHELLbashutf-8 · 3L
lynuxprolabLinux lab 6.8.0-49-generic #49-Ubuntu SMP x86_64 GNU/Linux
OUTPUTterminalutf-8 · 3L
  • whoami prints the user you are logged in as.
  • hostname prints the machine's name.
  • uname -a prints kernel details: the kernel name, machine name, kernel version and CPU type (x86_64 means 64-bit Intel or AMD).

Find out which distribution you are on:

cat /etc/os-release
SHELLbashutf-8 · 1L
NAME="Ubuntu"VERSION="24.04 LTS (Noble Numbat)"ID=ubuntu
OUTPUTterminalutf-8 · 3L

This 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:~$
OUTPUTterminalutf-8 · 1L
PartMeaning
lynuxproYour username
labThe 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
OUTPUTterminalutf-8 · 2L
  • Options (also called flags) change how the command behaves. Short options use one dash (-l) and can be joined together (-la is -l plus -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 /etc
SHELLbashutf-8 · 1L

Getting help

Nobody memorises every option. Professionals look things up all the time.

👉 Any time you forget an option or meet a new command.

help
SHELLbashutf-8 · 1L

On a real server you also have:

man ls          # the full manual page (press q to quit)ls --help       # a short summary of options
OUTPUTterminalutf-8 · 2L

Real-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-releaseuptime
SHELLbashutf-8 · 5L

In 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: LS is not ls, and Notes.txt is a different file from notes.txt.
  • Working as root all the time. Use a normal user, and sudo only for the commands that need it.
  • Ignoring the prompt. Many outages start with "I thought I was on staging".

Practice

  1. Run whoami, hostname and uname -a, and explain each line of output out loud.
  2. Use cat /etc/os-release to find the distribution name and version.
  3. Run ls -la in your home folder and find which entries are hidden (their names start with a dot).
  4. Type help and pick two commands you have not used yet. Try them.

Cheat sheet

CommandWhat it does
whoamiShow your username
hostnameShow the machine's name
uname -aShow the kernel and CPU type
cat /etc/os-releaseShow the distribution and version
uptimeShow how long the machine has been running, and how busy it is
clearClear 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 man or --help when you forget.