Lesson 0: The Components of Linux¶
Before we start learning commands, it is important to understand the key components of the Linux operating system: The kernel, The shell and The applications. Each key component operates on different layers of the operating system, but work closely together to provide the user with a workable system.
The kernel¶
The kernel is the core component of Linux. It it responsible for (but not limited to): interacting directly with the underlying hardware, handling system calls, file operations and process management.
The shell¶
The shell is an application which acts as an interface between the user and the kernel. When a user inputs a command, the shell interprets the command and instantiates a system call to the kernel, to interact with system hardware. The user can install and customise their shell, but this tutorial uses bash (Bourne-again shell). Other popular shells include: sh, csh and zsh.
The terminal (or tty) is a text input/output environment and a visual representation of the shell. Commands may be entered individually at the terminal's prompt or written to a file and ran as a shell script.
The applications¶
Everything in Linux is either a file or a process. A process is a program which is currently executing, identified by a unique PID (process identifier) and a file is a collection of data. The user spends most of his or her time in the application layer, interacting with application programs. Commands interpreted by the shell execute either a user or system application (also known as a binary).
Note
Processes can be run interactively attached to a terminal or in the background as a daemon