% WTF is Linux > What I cannot create, I do not understand. > > --- Richard Feynman, 1988 TODO: reference a mono font in the 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's very rare to build these kinds of things "manually," I do think it's 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/), a 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 remember. 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 unlock 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 (for example, hard drives, network card), it has to go through the kernel through system calls (for example, 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 file system --------------- Main article: [file system](file-system.md) A file system is a way of organizing data in the form of files and directories. Put another way, since hard drives store only bytes, it's the responsibility of the file system to organize these bytes such that the kernel can interpret them as files and directories and present them to the user. Init ---- Main article: [init](init.md) 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 file systems -------------------- Some file systems 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/`. More info in the [file system](file-system.md#special-file-systems) article. Networking ---------- TODO: quickly explain static IP vs DHCP, networking interfaces