1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
% WTF is Linux
> What I cannot create, I do not understand.
>
> --- <cite>Richard Feynman, 1988</cite>
TODO: add the LM fonts referenced in the CSS
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: fix pandoc\'s vimwiki (syntax highlighting, quotes)
TODO: Link manpages
TODO: Add pretty pictures
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"
The Shell
---------
TODO: link to main article
A shell is a programming language whose main goal is to launch other
programs.
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
|