These set of notes are Linux specific, check out OS page for general OS notes.
What is a Linux distro
Linux distro = Linux Kernel + (GNU) tools and libraries + desktop environment + package manager + other software
How to choose a Linux distro
- if you are new to Linux, or use Linux as your desktop, choose Ubuntu or its popular user friendly derivatives.
- if you are working on Linux servers, get familiar with Debian and/or RedHat (CentOS used to be popular on servers, but things changed.)
- if you are a hardcore Linux user, or simply want to learn more, choose a more customizable distro: Arch, Gentoo or Slackware.
- if you have specific use cases, search for the best option for the job: if you are working on security and doing Penetration Testing, choose Kali; if you want to deploy applications in container / cloud, choose a small distro like Alpine.
Linux Distros Differences
The work "Linux" actually refers to the Linux Kernel. That is why sometimes you may see the term GNU/Linux: GNU provides tools on top of the kernel.
Linux distros all use Linux kernel, though the versions may be different. The Linux kernel community promised that no upgrade will ever break anything that is currently working in a previous release.
Source code: https://github.com/torvalds/linux
- tools and libraries
- C standard library: e.g.
musl, etc. Read More: Standard Libraries
- BusyBox: a software suite that provides several Unix utilities in a single executable file, created for embedded operating systems with very limited resources. GPLv2
- Toybox: a 0BSD licensed BusyBox alternative, used in AOSP
- C standard library: e.g.
- desktop environment: GNOME, KDE, XFCE, etc
- package manager:
- APT / dpkg: Debian and derivatives
- RPM: Redhat and derivatives
- pacman: Arch and derivatives
- postage: Gentoo and derivatives (e.g. ChromeOS)
- init systems
- systemd: most major distros use this
- OpenRC is the default init system of Gentoo, Alpine Linux
- Supported chips / architecture: x86, x86_64, ARM, etc.
Some distros do rolling releases while others only release stable versions every few years. Some distros do both, e.g. Debian has Debian stable and Debian testing.
Notable Linux Distros
Debian / Ubuntu
- Ubuntu is derived from Debian. LTS (Long term support, supported for 5 years) versions every 2 years.
- Ubuntu is a very popular Desktop Linux; there are other popular distros built on top of Ubuntu, like Linux Mint
- gLinux: Google internal, not publicly available.
aptas package manager.
- many popular derivatives for desktops:
- MX Linux: based on Debian stable.
- Linux Mint: based on Ubuntu.
- Pop!_OS: based on Ubuntu, by System76. System76 is building a new desktop environment in Rust: "There are things we'd like to do that we can't simply achieve through extensions in GNOME".
- Elementary OS: based on Ubuntu.
- Zorin: based on Ubuntu, Windows-like.
- Kali: based on Debian, security oriented.
- Raspberry Pi OS: 64-bit available since 2022.
RedHat / CentOS / Fedora
- RHEL (Red Hat Enterprise Linux) is for enterprise use
- CentOS was the open source version; discontinued in 2020; CentOS Stream is NOT a replacement of CentOS, but will be a rolling preview of what's next in RHEL.
- CentOS clones after this change:
- Rocky Linux (parent: CIQ).
- CentOS clones after this change:
- Fedora is the community version. Each release is supported for 13 months; unlike Ubuntu, it does not provide Long Term Support.
- Amazon Linux: Based on Fedora, major release every 2 years, with 5 years of support and quarterly minor release updates. https://aws.amazon.com/linux/amazon-linux-2022
yumas package manager.
Can be fully customized.
- SteamOS: 1.0 and 2.0 were based on the Debian, 3.0 is changed to be based on Arch Linux. (Because Debian is more for servers, and has release cycles; Arch uses a rolling update, which is prefered by Valve for Steam Deck)
- Manjaro: baesd on Arch but much easier to use. Manjaro is Arch-based but it isn’t Arch Linux.
- EndeavourOS: lightweight and ships with a minimum amount of preinstalled apps. Since 2019. As close to plain-vanilla Arch as you can get, without hand-assembling Arch Linux the hard way.
- Garuda: performance oriented.
Gentoo / ChromeOS
- Gentoo: source-code-based. Named after the fast-swimming gentoo penguin, to reflect the potential speed improvements.
- ChromeOS: originally based on Debian, but later moved to Gentoo.
Small, simple and secure. Often used for containers in clouds.
Using musl, BusyBox.
Slackware is the oldest distribution that is still maintained (created in 1993). Highly customizable. The first vesions of SUSE was based on Slackware.
Yes Android is also based on Linux; however Google's new OS, Fuchsia, is not based on Linux, but a microkernel called Zircon.
These are all standards for operating system interfaces.
Read more on Android
Different file hierachy: each program gets its own directory tree.
Optimized for Intel's microprocessors with an emphasis on performance and security. Rolling release.
Google's internal distro.
The first version was named Goobuntu, which was based on Ubuntu.
In 2018, Google moved from the Goobuntu to gLinux, which was based on based on Debian testing, with rolling releases, to avoid the 2-year release cycles.
For corp machines (directly used by developers to write and test code) only, not for prod (where the services like Google Search runss).
A modified version of the Linux kernel that contains no binary blobs, obfuscated code, or code under proprietary licenses.
License: GPL v2.
Recent / future developments
eBPF: a handy way to build firewalls.
Microsoft chose to port eBPF into Windows rather than try to duplicate its functionality with its own program.
io_uring allows Linux to launch an operation asynchronously and wait for its completion. (predecessor: asynchronous I/O (AIO) subsystem)
io_uring uses a memory ring buffer shared between user space and the Linux kernel. This enables it to submit operations and collect the results without needing time-expensive Linux kernel calls. Its API is complex, but if your applications require lots of I/O, you get rewarded with vastly improved increased performance.
Read more: namespaces
The init system. Read more: systemd