History

1990

We can consider Linus Torvalds’s email on August 25, 1991, to the comp.os.minix newsgroup as the birth of the Linux project, at least in terms of the public record. This hobby project soon took off, both in terms of lines of code (LOC) and in terms of adoption. For example, after less than three years, Linux 1.0.0 was released with over 176,000 LOCs. By that time, the original goal of being able to run most Unix/GNU software was already well reached. Also, the first commercial offering appeared in the 1990s: Red Hat Linux.

2000 to 2010

Linux was a teenager, and it was increasingly used by Google, Amazon, IBM, etc. distro wars started

2010 to now

Linux establish itself as the workhorse for data centers, cloud, iot, phones.

Why use an OS at all?

Technically speaking, an OS is not strictly needed. There are systems out there that do not have an OS. These are usually embedded systems with a tiny footprint: think of an IoT beacon. They simply do not have the resources available to keep anything else around other than one application. For example, with Rust you can use its Core and Standard Library to run any app on bare metal

However, you would end up taking care of many low-level hardware concerns such as:

  • dealing with interrupts
  • memory management
  • I/O
  • networking
  • files management

Instead, OS provides a nice abstraction that is exposed via an API which we refer to system calls. Programming languages are built on top of syscalls, potentially wrap them in library

Example syscal

at the Linux syscall getuid(2):

getuid() returns the real user ID of the calling process.

Sections in man

The (2) in getuid(2) is a terminology that the man utility (think built-in help pages) uses to indicate the section of the command assigned in man, akin to a postal or country code.

From the CLI, we would invoke the getuid syscall using the id command like so: id --user

Linux Distributions

A distribution is the Linux Kernel bundled with related components such as:

  • package management
  • file system layout
  • init system
  • shell
  • other preselected software

See Linux Distributions for the full breakdown of bases, family trees, release models, init systems, and desktop environments.

Building your own distros

Most people tried and abandoned this road, but if you want, you can try Arch Linux

Distrowatch allows to get a glimpse on the incredible number of Linux distributions available

Resource visibility

Linux historically had a global view on resource, such as CPU, ram, files, processes, networking. With containers this is change, as containers can have restricted access to resources.

Tip

Not all resources in Linux are represented to through a file, although there are systems such as Plan 9 from Bell Labs takes this much further

cat /proc/version 
cat /proc/cpuinfo | grep "model name"
cat /proc/$$/status

Useful books

  • book Linux Cookbook by Carla Schroder

  • book Understanding the Linux Kernel by Daniel P. Bovet and Marco Cesati

  • book Efficient Linux at the Command Line by Daniel J. Barrett

  • book Linux System Programming by Robert Love