% WTF is Linux > What I cannot create, I do not understand. > > --- Richard Feynman, 1988 TODO: reference a mono font in the CSS TODO: fix TOC CSS TODO: have a POSIX / UNIX / Linux section TODO: have a QEMU section TODO: specify dependencies TODO: Add a plan checklist? TODO: Link manpages TODO: Add pretty pictures Goal of this course and this document ------------------------------------- In this course, we will attempt to create a GNU/Linux file system from scratch. The objective is to deeply understand the Linux ecosystem: how it boots, what are the different pieces, how do they integrate with one-another, what are the different choices available to us when building such a system, etc. Even though it is very rare to build these kinds of things "manually", I do think it is better to do it this way for educative purposes. However, in the practical work part, we will build a Linux system in an automated fashion, using [Buildroot](https://buildroot.org/), an well-known software in the industry for building embedded Linux systems. This document is intended to serve several functions: - As notes, if I talk too fast, or if you don't like to take notes[^take-notes], or miss classes - It's likely that this website is going to be more detailed than the course, so it's useful you want to go further. You can also follow the links to go even further - Should I miss some things while talking, this website should fix it [^take-notes]: {-} You really should be taking notes, it does help remembering The Linux command-line ---------------------- Main article: [CLI](cli.md) When we say "command-line interface", we usually mean the text-based program whose main purpose is to execute other commands. You input a program name, enter its arguments, press enter, and it will execute the said program with said arguments. In reality, the UNIX command-line is more complicated than that, but that also makes it much more powerful. See the main article if you want to unlocking this power. The Linux Kernel ---------------- Main article: [kernel](kernel.md) The Linux kernel is the glue between the hardware and the user space programs. Each time a user program needs to access the hardware (e.g. hard drives, network card), it has to go through the kernel through system calls (e.g. read/write on a file, `sendto`/`recvfrom` on a socket). It also decides how processes are run, and is in charge of enforcing security. The filesystem -------------- TODO: link to main article A filesystem is a way of organizing data in the form of files and directories. Another way to see it is that since hard drives stores only bytes, it is the responsibility of the filesystem to organize these bytes such that the kernel can interpret them as files and directories and present them to the user (TODO: link mount). Init ---- TODO: link to main article The init program is the first user-space program that the kernel launches on boot. Every other program is launched either by init or a child of init (direct child or transitive child). Since init is the first program launched it always has a PID of 1. TODO: link to first steps to "user-space booting" Special filesystems ------------------- Some filesystem aren't used to store data, but instead to communicate with the kernel. This allows doing various things using only the `read`, `write`, and other file-related system calls. For example, you can list USB devices by listing the content of the directory `/sys/bus/usb/devices/`. TODO: add links to article with list of common special filesystems. Networking ---------- TODO: quickly explain static IP vs DHCP, networking interfaces