$ uname -aLinux lab 6.8.0-45-generic … x86_64 GNU/Linux$ lshello.py notes.txt photosshellunamelsLinux kernelGPL-2.0 · open sourceCPUmemorydiskUbuntuserversDebiancloudFedoraTOP500Androidphonesuname -als
Back: user space (terminal, shell, programs). Middle: the Linux kernel. Front: the hardwareShelf: Linux distributions, and the machines Linux runs onTokens: your typed command, a start signal, and system-call envelopes to and from the kernelUser space at the back: the terminal, the shell and two small programs. The Linux kernel in the middle, the only layer that touches the hardware in front: the CPU, memory and the disk. Beside the hardware, Linux systems: distributions, and the machines Linux runs on. Type uname -a and the command hops to the shell, which starts the uname program through the kernel; uname asks the kernel with a system call and the answer comes back to the terminal. ls makes the same trip, down to the disk. 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.

What Linux is

  1. 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.

Talking to Linux

A command's trip

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.