Linux at a Glance
What Linux is and where you meet it: distributions, desktops and servers, package managers, the file system layout, and the first commands.
What Linux is
Linux is, strictly speaking, a kernel: the core of an operating system that manages processes, memory, devices and file systems. Linus Torvalds started it in 1991 as a hobby project, and it is now developed by thousands of people, many of them paid by companies that depend on it.
A kernel alone is not something you can log in to. You also need a shell, basic commands (copy, list, edit), system libraries and a way to start services. Many of those pieces come from the GNU project ("GNU's Not Unix"), started by Richard Stallman in 1983 to build a free Unix-like system. That is why some people insist on the name "GNU/Linux" for the complete system. In everyday IT, "Linux" means the whole operating system, and that is how this page uses it too.
Linux is Unix-like: it behaves like the Unix systems of the 1970s and 1980s (one directory tree, users and groups, permissions per file, small commands that can be combined) without sharing their code. macOS is also Unix-like, so much of what you learn in a Linux terminal works in the macOS Terminal as well.
Open source and licenses
Open-source software is software whose source code is published under a license that lets anyone use it, study it, change it and share it, also for commercial purposes. "Free software" is the older term for the same idea, and the "free" means free as in freedom, not free of charge: companies are allowed to sell open-source software and support for it, and many do.
The Linux kernel uses the GNU General Public License (GPL), version 2. The GPL is a copyleft license: if you distribute a modified version, you must make your source code available under the same license. That is why manufacturers of routers, TVs and phones that ship a modified Linux kernel publish their kernel source. Permissive licenses such as MIT, BSD and Apache 2.0 ask much less: keep the copyright notice, and you may even build closed products on top.
For an organization, open source means no license fee per installation and no single vendor that can stop the product. It does not mean no cost: someone still has to support the systems, which is why companies pay for enterprise distributions with a support contract.
Distributions and families
A Linux distribution (distro) is a complete operating system built around the Linux kernel: the kernel plus libraries, tools, an installer, a package manager and a curated collection of software, tested to work together and kept up to date by the distribution's maintainers. There are hundreds, but almost all descend from a few families. Knowing the family tells you which package manager and which configuration conventions to expect.
| Family | Examples | Packages | Typical use |
|---|---|---|---|
| Debian | Debian, Ubuntu, Linux Mint, Raspberry Pi OS | .deb, apt |
Servers, cloud, desktops; Ubuntu is the most common starting point |
| Red Hat | Red Hat Enterprise Linux (RHEL), Fedora, CentOS Stream, Rocky Linux, AlmaLinux | .rpm, dnf |
Enterprise servers (RHEL and its compatible rebuilds); Fedora for up-to-date desktops |
| SUSE | SUSE Linux Enterprise, openSUSE | .rpm, zypper |
Enterprise servers, common in Europe |
| Arch | Arch Linux, Manjaro | pacman |
Enthusiasts; always the newest versions |
RHEL is the commercial distribution with a subscription and support. Fedora is its community-driven proving ground, and Rocky Linux and AlmaLinux are free rebuilds that aim to be compatible with RHEL. (CentOS Linux used to fill that role; it has ended, and CentOS Stream now sits just ahead of RHEL instead.)
Server or desktop, and LTS
Many distributions come in a server and a desktop edition. They share the same base; the server edition simply leaves out the graphical desktop and adds server tools. What matters more for a server is how long a release receives security updates.
- A long-term support (LTS) release stays on the same versions for years and only receives security and bug fixes. Ubuntu publishes an LTS release every two years, in April of even years (22.04, 24.04), with five years of standard security updates and longer through a subscription. RHEL releases are supported for about ten years.
- A rolling release (Arch, openSUSE Tumbleweed) has no versions at all: it updates everything continuously. That is great for enthusiasts and risky for a server that must behave the same tomorrow.
Servers in organizations almost always run an LTS or enterprise release. When a ticket says "the server runs Ubuntu 20.04", the first question is whether that release still gets security updates (see Updates, Patches and Drivers).
Where you meet Linux
You may never see a Linux desktop at a help desk, but you will meet Linux all the time:
- Servers and the cloud: web servers, databases, mail relays and most virtual machines and containers in the public cloud run Linux. Every one of the world's 500 fastest supercomputers does too.
- Network and storage devices: many routers, firewalls, Wi-Fi access points and network-attached storage (NAS) boxes run Linux underneath their web interface.
- Android: every Android phone runs a modified Linux kernel, although the rest of Android is very different from a typical distribution (see Mobile Operating Systems). ChromeOS on Chromebooks is Linux-based as well.
- Embedded devices: smart TVs, printers, point-of-sale terminals, cars and industrial controllers.
- Raspberry Pi: the small single-board computers used for learning, displays and small servers usually run Raspberry Pi OS, a Debian-based distribution.
- Windows: the Windows Subsystem for Linux (WSL) runs a real Linux distribution inside Windows 10 and 11, which developers and administrators use for Linux tools.
Desktops, and servers without them
On Linux, the graphical desktop is not part of the operating system core; it is a replaceable set of programs. A desktop environment is such a set: the panel or taskbar, the application launcher, the file manager, the settings app and the look of windows, designed to work together. The two big ones are:
- GNOME: the default on Ubuntu and Fedora Workstation. Clean, with an overview screen for switching apps and searching.
- KDE Plasma: closer to the classic Windows layout with a taskbar and start menu, and highly configurable.
Lighter ones such as Xfce suit older hardware. Because the desktop is separate, the same distribution can look very different on two computers, which can confuse users who expect "Linux" to look one way.
Servers usually have no graphical interface at all. A desktop would use memory and processor time, add software that needs patching, and serve no purpose on a machine in a data center. Administrators manage servers through a command line, mostly over the network with Secure Shell (SSH) (see Remote Access and Management), or through automation tools.
The file system layout
Linux has no drive letters. Everything is part of one tree that
starts at the root directory, written as a single
slash: /. A second disk or a USB stick does not become
D:; it is mounted into a directory in that
tree, such as /mnt/backup or
/media/ana/USBSTICK. Paths use forward slashes, and
names are case-sensitive: Report.txt and
report.txt are two different files.
Where things live follows the Filesystem Hierarchy Standard (FHS), so the same directories exist on nearly every distribution:
| Directory | Contains | Windows counterpart (roughly) |
|---|---|---|
/ |
The root of the whole tree | C:\ |
/home |
One directory per user (/home/ana) with their
documents and personal settings
|
C:\Users |
/etc |
System-wide configuration, as plain text files | The registry, partly |
/var |
Data that changes while the system runs: logs in
/var/log, caches, mail and print queues
|
C:\ProgramData, event logs |
/usr |
Installed programs, libraries and documentation
(/usr/bin, /usr/lib)
|
C:\Program Files, C:\Windows
|
/tmp |
Temporary files; often emptied at every restart | %TEMP% |
/boot |
The kernel and the boot loader's files | The boot partition and boot files |
/dev |
Device files: disks, terminals, USB devices | No real counterpart |
Two more you will see: /root is the home directory of
the root user (not the same as /), and
/mnt and /media are where extra disks and
removable media are mounted. How the tree is stored on disk (ext4,
XFS) is covered in File Systems.
The top-level directory of a path already tells you what kind of file it is. This small program uses that to sort paths from a ticket:
from pathlib import PurePosixPath
PURPOSE = {
"boot": "kernel and boot loader",
"dev": "device file",
"etc": "configuration",
"home": "a user's own files",
"tmp": "temporary file",
"usr": "installed software",
"var": "changing data (logs, caches)",
}
paths = [
"/etc/ssh/sshd_config",
"/var/log/apt/history.log",
"/home/ana/Documents/budget.ods",
"/usr/bin/python3",
"/dev/sda",
"/tmp/upload-0417.part",
]
for path in paths:
top = PurePosixPath(path).parts[1] # parts[0] is "/"
print(f"{path:<32} {PURPOSE.get(top, 'other')}")
/etc/ssh/sshd_config configuration /var/log/apt/history.log changing data (logs, caches) /home/ana/Documents/budget.ods a user's own files /usr/bin/python3 installed software /dev/sda device file /tmp/upload-0417.part temporary file
Everything is a file
A Unix principle that Linux follows: as far as possible, everything
is represented as a file in the tree. The first disk is
/dev/sda, the first NVMe (Non-Volatile Memory Express)
drive is /dev/nvme0n1, and information about the
processor can be read from the text file /proc/cpuinfo,
which the kernel generates on the fly. Settings are text files in
/etc. The practical benefit: the same small tools that
read, search and copy ordinary files also work on devices, settings
and system information.
Installing software: package managers
On Windows you often download an installer from a vendor's website. On Linux you normally don't. A package manager installs, updates and removes software from repositories: online collections of packages that the distribution builds, tests and signs. The package manager verifies signatures on the packages or the repository index, installs the other packages it depends on (dependencies), and keeps a database of what is installed where.
-
apton Debian, Ubuntu and their relatives, with.debpackages. -
dnfon Fedora, RHEL and their relatives, with.rpmpackages (older systems usedyum).
Why this is better than downloading installers:
- Trust: packages come from a known source and are signed, so a tampered package is rejected. A random download site can hand you malware.
- One update for everything: one command updates the operating system and every installed application. There is no separate updater per program.
- Clean removal: the package manager knows every file it installed and can remove them all again.
Some applications are also distributed as Snap or Flatpak packages, which bundle their own dependencies and run more isolated from the system. Adding a third-party repository is sometimes necessary (for example for a vendor's own software), but it means trusting that vendor with the same power as the distribution itself.
Root and sudo
Every Linux system has one all-powerful account: root, with user ID 0. Root can read and change every file and stop every process. Working as root all the time is dangerous, because a single typing mistake or a malicious script can damage the whole system. Accounts and permissions are explained in Users, Permissions and Access Control.
Instead, administrators log in as themselves and use
sudo ("superuser do") to run a single
command with root privileges: sudo apt upgrade.
sudo asks for your own password, not root's,
checks in /etc/sudoers whether you are allowed, and
logs what you ran. Only members of an administrative group (called
sudo on Debian and Ubuntu, wheel on Fedora
and RHEL) may use it by default. On Ubuntu the root account is
locked (it has no usable password), so administrators use
sudo.
The idea is the same as User Account Control on Windows: you are an
administrator, but elevated rights are used only for the one action
that needs them. The older command su
("switch user") instead opens a whole shell as another user, usually
root, and needs that user's password.
First commands for a technician
A Linux terminal opens a shell, usually Bash, in your home
directory. The prompt typically shows your user name, the computer
name and the current directory, where ~ is short for
your home directory. These commands get you through a first visit to
a Linux machine:
| Command | What it does | Example |
|---|---|---|
pwd |
Prints the current (working) directory | pwd |
ls |
Lists files; -l adds details,
-a shows hidden files (names starting with a
dot)
|
ls -la /etc |
cd |
Changes directory; cd .. goes up one level,
cd alone goes home
|
cd /var/log |
cat |
Prints a (short) file | cat /etc/os-release |
less |
Pages through a long file; arrow keys to scroll,
/ to search, q to quit
|
less /var/log/apt/history.log |
cp |
Copies files; -r copies a directory with its
contents
|
cp report.txt report.bak |
mv |
Moves or renames | mv report.bak old/ |
rm |
Removes files; -r removes directories with
their contents
|
rm old/report.bak |
man |
Opens the manual page of a command; q to quit
|
man ls |
A short first session: where am I, what is here, and which distribution is this? (Illustrative output.)
pwd
ls -l
cat /etc/os-release
/home/ana total 12 drwxr-xr-x 2 ana ana 4096 Sep 28 09:14 Documents drwxr-xr-x 2 ana ana 4096 Sep 28 09:14 Downloads -rw-r--r-- 1 ana ana 220 Sep 28 09:12 notes.txt PRETTY_NAME="Ubuntu 24.04.3 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian ...
The ID_LIKE=debian line tells you the family, and so
the package manager. In ls -l, the first column shows
the type (d for directory) and the permissions, then
the owner and group, the size in bytes, the modification time and
the name.
Updating the system
On a Debian or Ubuntu machine, these two commands bring the whole system up to date:
sudo apt update && sudo apt upgrade
apt update does not update any software: it downloads
the latest lists of available packages from the
repositories. apt upgrade then installs the newer
versions of everything that is installed, after showing what it will
change and asking for confirmation. && runs the
second command only if the first succeeded. On Fedora and RHEL,
sudo dnf upgrade does both steps at once. To install a
new program: sudo apt install htop or
sudo dnf install htop.