Yesterday, while studying, I came across a very interesting comic about the Linux kernel. I feel that it will provide a better understanding of the Linux kernel for those who are new to Linux. I would like to share it with everyone here.
This comic effectively demonstrates the basic operating principles of Linux. As a layered system, Linux is divided into three layers in the comic. The bottom layer is the file system, which manages and operates files. The middle layer is where process management occurs, and the top layer consists of tty, which represents command-line tools for system-user interactions.
Let's start with the bottom layer. Firstly, the bottom layer is a filesystem, where file operations are managed. Each penguin in this layer can be understood as a process. We can see that the penguin numbered 421 is opening a file cabinet, which can be interpreted as a process with PID 421 reading a folder and performing operations on the file system.
The middle layer is where process management occurs. We can see many different penguins performing their respective tasks. In the bottom right corner, on the process table, there is a penguin numbered 171 resting with its eyes closed. This indicates that the process is idle and not currently handling any tasks.
Apart from processes, we can also see several dogs. These dogs represent systems that manage and monitor processes. Additionally, there are interesting details on the wall. For example, on the left side, there is a process numbered 1341 that is listening on port 80. This implies that the process is handling some network input/output tasks.
Further along, there is a port 21, and we can see that the sign for this port is about to fall off, indicating that this port has not been visited for a long time. As many may know, port 21 is responsible for the FTP protocol, which suggests that this protocol is relatively outdated.
We can compare port 21 with the neighboring port 22. Port 22 is well-known as the default listening port for SSH. We can see that the penguin listening on port 22 is wearing sunglasses, giving the impression of being famous and energetic. This indirectly reflects that SSH or port 22 is currently a commonly used or popular port.
Moving on, there is a large penguin numbered 217 named "cron," which is a process responsible for scheduling timed tasks.
There is also a penguin named "wine," which allows running Windows applications on computers running Linux, FreeBSD, or other operating systems.
Towards the back, we can see two penguins carrying a pipe together. This indicates that different processes can communicate with each other through pipes, enabling inter-process communication.
Finally, we can see a staircase that directly leads to the file system of the bottom layer, where the penguin numbered 421 is working.
The top layer mainly consists of tty, which interacts with users through command-line interfaces. We can see penguins monitoring these tty and processing user input to produce results.
Lastly, I would like to share a mind map of Linux with everyone. Feel free to take it if you find it useful.