What Linux is
Linux is a kernel: the core program of an operating system. It starts every other program and shares out the CPU, the memory and the disk between them. Linus Torvalds wrote the first version.
A kernel alone is not enough to use. Add a shell, commands and apps and you get a whole operating system. Ready-made bundles are called distributions: Ubuntu, Debian and Fedora are three. Android phones use the Linux kernel too.
The same kernel runs on very different machines: web servers, cloud computers and Android phones. On the TOP500 list of November 2017, all 500 of the world's fastest supercomputers ran Linux, the first time one system ran them all.
Linux is open source. Its code is published under the GNU General Public License, version 2 (GPL): anyone may read it, change it and share it, as long as the changes they share stay under the same licence.
Talking to Linux
Programs you run, the shell included, live in user space. Only the kernel, in kernel space, may touch the hardware. When a program needs the disk or the screen, it must ask the kernel: that request is a system call.
You talk to Linux by typing. The terminal is the window where you type and where text comes back. The $ is the prompt: it means ready. We type uname -a, a command that asks: which system is this?
A command's trip
Press Enter and the terminal hands your line to the shell, a program that reads commands. Ubuntu, Debian and Fedora use one called bash. It splits the line into a name, uname, and an option, -a.
uname is a small program kept on the disk. The shell asks the kernel to start it with two system calls: fork (on Linux, glibc runs it as clone) and execve. Now uname is running too, in user space.
uname cannot look inside the kernel, so it makes a system call, also named uname. The CPU switches into kernel mode and the kernel fills in its name, its version and the kind of machine.
The kernel hands the answer back and uname prints it: kernel Linux, computer lab, release 6.8.0, machine x86_64. Printing is one more system call, write. Then the shell shows a new prompt.
Type ls and the shell starts the ls program, which asks the kernel to read this folder from the disk. Back come the names, sorted A to Z: hello.py, notes.txt, photos. Every command travels this way.
What happens
;; step 1/11 · kernel
kernel the core program of an operating system
starts every other program
shares the CPU between them
gives each its own memory
keeps files on the disk
Linux a kernel, written from scratch by Linus Torvalds
with help from people across the internet
The uname answer on the card is an example from an Ubuntu 24.04 computer named lab. The middle (the kernel's build number and date) is cut to "…". Your machine prints its own name and version. Strictly, the terminal and the shell also talk through the kernel (a pseudo-terminal), and the shell waits for the program to finish before it shows the next prompt. The figure shows the main trip only. Also, on Linux the fork() wrapper in the C library (glibc) actually makes the clone system call.