Understanding Linux – History, Philosophy, and Architecture

What Is Linux? Distinguishing the Kernel from the Operating System
a different approach to computing
critical distinction between the kernel and the Operating System

The Kernel: The Engine
technically Linux si just the kernel
has complete control of everything in the system
first program loaded after bootloader
manages the hardware
the engine of the car

The Operating System: The Car
OS is the rest of the car
a wrapper around the kernel
includes tools, libraries and applications
a Linux distribution bundles kernel and necessary tools to create a functional OS

The GNU/Linux Naming
Linux can be called GNU/Linux Linus Torvalds wrote the kernel
many essential tools come from the GNU project started by Richard Stallman
The Origins of Linux: From UNIX to Linus Torvalds
The Unix Era
UNIX created in the late 1960s and early 1970s at Bell Labs
designed to be simple, elegant and portable
philosophy of 'do one thing and do it well'
proprietary software

The Rise of GNU
Stallman was against proprietary software
GNU Project had goal of creating a complete, free OS containing no proprietary code
not having a kernel was a problem

Enter Linus Torvalds
as a student Torvalds wanted to a Unix-like OS but couldn't afford the licensing
an educational system MINIX existed but was too limited for Torvalds
started writing his own kernel as a hobby project
the source code was released under the GNU license
developers contributed to the project combining Torvalds' kernel with the GNU tools

The Open Source Philosophy: GPL, Free Software, and Community Development
The GPL (General Public License)
Linux released under the GNU General Public License aka 'copyleft'
  1. freedom to run the program for any purpose
  2. freedom to study how a program works and modify it as desired
  3. freedom to redistribute copies
  4. freedom to distribute copies of the modified version to others
How Linux Differs from Windows and macOS
The File System Structure
no drive letters in Linux
single, unified hierarchy called a tree
top of tree is the root
root is represented by a foward slash /
every HDD, USB stick or network share is attached to a directory in the tree

Configuration Files vs. The Registry
Linux stores configuration in simple text files

Case Sensitivity
with Linux filenames are case-sensitive
File.txt, file.txt and FILE.TXT represent three different files

The User Interface
can't really run Windows or macOS without a graphical interface
with Linux the GUI is just another program
can use just the CLI without GUI

The Linux Architecture: Kernel, Shell, System Libraries, and User Space
Layer 1: The Hardware
physical computer including all hardware

Layer 2: The Kernel
interacts with hardware
speaks CPU's binary language
manages electrical signals of hardware

Layer 3: System Libraries
special functions allow developers to interact with the kernel
system libraries act as translation layers between software and kernel

Layer 4: The Shell
user interface allowing access to kernel via OS
shell interprets commands and call appropriate sytem function or application
wraps around the kernel
hides complexity of internal systems

Layer 5: User Space
contains all applications
apps talk to system libraries and the shell which in turn talks to the kernel which in turn talks to the hardware
an app crash will not bring down the kernel
instead kernel will clean up the memory and keep running

Where Linux Is Used Today: Servers, Cloud Infrastructure, Embedded Systems, and Desktops
Linux has small market share on home desktops (3 to 5%)

The Server Room and the Internet
majority of web servers run Linux
preferred because it's free, secure and efficient

Super Computers
most if not all super computers run Linux

The Cloud
clouds are built on Linux
allows modern apps to scale
tools like Docker and Kubernetes are native Linuxx technologies

Mobile Devices
Android is based on the Linux kernel

Embedded Systems
Linux is highly customizable
used in many embedded systems

Space
SpaceX runs its flight computers on Linux
NASA's Mars rovers and helicopters run on Linux

Summary
Kernel vs. OS
Linux is the kernel
a distribution (OS) includes the kernel plus tools

Open Source
free to use, modify and distribute
developed by global community and major corporations

Case Sensitivity
File.txt, file.txt and FILE.txt are different files

Filesystem
single directory tree starting a root

Everywhere
Linux can be found everywhere
Configuration
most configuartions stored in human readable text files

index