Linux can be divided into 4 parts: 1. Kernel, which controls all hardware and software on the computer system and is mainly responsible for system memory management, software program management, hardware device management, and file system management; 2. GNU Tools, necessary tools other than kernel-controlled hardware devices, such as shell; 3. Desktop environment, such as KDE; 4. Application software.

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Linux is a free and open source UNIX-like operating system. It is mainly inspired by the ideas of Minix and Unix. It is a POSIX-based multi-user, multi-task, multi-thread and multi-CPU operating system. Linux can be divided into the following four parts:
- Linux kernel
- GNU tools
- Graphical desktop environment
- Application software
The figure below is a basic structural block diagram, showing how each part works together to form a complete Linux system. 
1.Linux kernel
The core of the Linux system is the kernel. The kernel controls all hardware and software on a computer system. The kernel is mainly responsible for the following four functions:
- System memory management
- Software program management
- Hardware device management
- File system management
1.1 System Memory Management
One of the main functions of the operating system kernel is memory management. The kernel not only manages the physical memory available on the server, it can also create and manage virtual memory (that is, memory that does not actually exist). The kernel implements virtual memory through the storage space on the hard disk. This area is called swap space. The kernel is constantly swapping the contents of virtual memory between swap space and actual physical memory. This makes the system think it has more memory available than physical memory. 
The memory storage unit is divided into many blocks according to groups, and these blocks are called pages. The kernel places each memory page in physical memory or swap space. The kernel then maintains a memory page table, indicating which pages are located in physical memory and which pages have been swapped to disk.
The kernel will record which memory pages are in use, and automatically copy memory pages that have not been accessed for a period of time to the swap space area (called swapping out) - even if there is still available memory. When a program wants to access a memory page that has been swapped out, the kernel must swap out another memory page from physical memory to make room for it, and then swap in the requested memory page from the swap space. Obviously, this process takes time and slows down the running process. As long as the Linux system is running, the process of swapping out memory pages for running programs will never stop.
1.2 Software program management
The Linux operating system calls running programs a process. The kernel creates the first process (called the init process) to start all other processes on the system. When the kernel starts, it loads the init process into virtual memory. When the kernel starts any other process, it allocates a private area in virtual memory to the new process to store the data and code used by the process.
The init system of the Linux operating system adopts a run level. The run level determines that the init process runs certain types of processes defined in the /etc/inittab file or the
/etc/rcX.d directory. The Linux operating system has 5 startup run levels.
When the run level is 1, only basic system processes and a console terminal process are started. We call this single-user mode. Single-user mode is usually used for emergency file system maintenance when there is a system problem. Obviously, in this mode, only one person (usually the system administrator) can log in to the system to manipulate data.
The standard startup run level is 3. At this run level, most application software, such as network support programs, will start. Another common runlevel in Linux is 5. At this run level, the system will start the graphical X Window system, allowing users to log in to the system through the graphical desktop window.
Linux system can control the functions of the entire system by adjusting the startup run level. By adjusting the run level from 3 to 5, the system can be changed from a console-based system to a more advanced graphical X Window system.
1.3 Hardware device management
Another responsibility of the kernel is to manage hardware devices. Any device that a Linux system needs to communicate with needs to have its driver code in the kernel code. The driver code acts as a middleman between the application and the hardware device, allowing data to be exchanged between the kernel and the device. There are two methods for inserting device driver code in the Linux kernel:
- Device driver code compiled into the kernel
- Device driver module that can be inserted into the kernel
Linux system treats hardware devices as special files, called device files. There are 3 categories of device files:
- Character device file: refers to a device that can only process one character at a time when processing data. Most types of modems and terminals are created as character device files
- Block device file: refers to a device that can handle large chunks of data at a time, such as a hard disk.
- Network device files: refers to devices that use data packets to send and receive data, including various network cards and a special loopback device.
1.4 File system management
The Linux kernel supports reading and writing data from the hard disk through different types of file systems. Table 1-1 lists the standard file systems used by Linux systems to read and write data. 
2.GUN tools
In addition to controlling hardware devices by the kernel, the operating system also requires tools to perform some standard functions, such as control files And procedures. This core set of tools for Linux systems is called coreutils (core utilities) package. The GNU coreutils software package consists of three parts:
- Tools for processing files
- Tools for manipulating text
- Tools for managing processes
2.1 shell
GNU/Linux shell is a special interactive tool. It provides users with a way to launch programs, manage files in the file system, and processes running on Linux systems. The core of the shell is the command line prompt. The command line prompt is the interactive part of the shell. It allows you to enter text commands and then interpret the commands and execute them in the kernel. You can also put multiple shell commands into a file and execute them as a program. These files are called shell scripts.
On a Linux system, there are usually several Linux shells available. Different shells have different features, some are better for creating scripts, and some are better for managing processes. The default shell for all Linux distributions is the bash shell. The bash shell was developed by the GNU project and is regarded as a standard Unix shell.
2.1.1 Types of shell
What kind of shell program is started by the system depends on your personal user ID configuration. In the /etc/passwd file, the default shell program is listed in the 7th field of the user ID record. As soon as the user logs into a virtual console terminal or starts a terminal emulator in the GUI, the default shell program starts running. For example: user root uses /bin/bash (bash shell) as its default shell program.
[root@node1 bin]# cat /etc/passwdroot:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
But there is another default shell is /bin/sh, which is used as the default system shell for those A system shell script that needs to be used at startup. You often see some distributions using soft links to set the default system shell to the bash shell, such as CentOS distributions:
$ ls -l /bin/sh
lrwxrwxrwx. 1 root root 4 Mar 18 15:05 /bin/sh -> bash
/bin/sh equivalent For /bin/bash --posix, using sh to call the execution script is equivalent to turning on the POSIX standard mode of bash. The various differences between them are from the differences between the POSIX standard mode and bash.
2.1.2 Shell’s parent-child relationship
is the default interactive shell started when logging into a virtual controller terminal or running a terminal emulator in the GUI. is a parent shell.
When you enter the /bin/bash command or other equivalent bash command after the CLI prompt, a new shell program is created. This shell program is called a child shell. The subshell also has a CLI prompt and will also wait for command input.
For example: use ps -f
[root@node1 bin]# ps -fUID PID PPID C STIME TTY TIME CMD root 727 711 0 11:01 pts/0 00:00:00 -bash root 4385 727 0 12:06 pts/0 00:00:00 ps -f
When using ps -f, two processes are displayed. The process ID of one of the processes is 727, and it is running the bash shell program. The process ID of another process is 4385, which corresponds to the command ps -f.
[root@node1 bin]# bash[root@node1 bin]# ps -fUID PID PPID C STIME TTY TIME CMD root 727 711 0 11:01 pts/0 00:00:00 -bash root 4492 727 0 12:08 pts/0 00:00:00 bashroot 4512 4492 0 12:08 pts/0 00:00:00 ps -f
After entering the command bash, a subshell appears. The second ps -f is executed in a subshell. You can see from the displayed results that there are two bash shell programs running. The original process ID of the first bash shell program, which is the parent shell process, is 727. The second bash shell program, the subshell process, has a PID of 4492. Note that the parent process ID (PPID) of the subshell is 727, indicating that this parent shell process is the parent process of the subshell. When a subshell process is generated, only part of the environment of the parent process is copied to the subshell environment.
3.Linux Desktop Environment
1.KDE (K Desktop Environment, K Desktop Environment) was originally released as an open source project in 1996. It generates a graphical desktop environment similar to Microsoft Windows. 
KDE Desktop allows you to place application icons and file icons at specific locations on the desktop. Click the application icon and the Linux system will run the application. Click a file icon and the KDE desktop determines which application to use to handle the file.
2.GNOME (the GNU Network Object Model Environment, the GNU Network Object Model Environment) is another popular Linux desktop environment. GNOME was first released in 1999 and has become the default desktop environment for many Linux distributions.

3.Unity Desktop
If you are using the Ubuntu Linux distribution, you will notice that it is somewhat different from the KDE and GNOME desktop environments no the same. To be precise, this is because the company responsible for developing Ubuntu decided to adopt its own Linux desktop environment called Unity.
Unity Desktop gets its name from the project's goal - to provide a consistent desktop experience for workstations, tablets, and mobile devices. Whether you're using Ubuntu on a workstation or a mobile phone, the Unity desktop works the same way.

Related recommendations: "Linux Video Tutorial"
The above is the detailed content of What parts can linux be divided into?. For more information, please follow other related articles on the PHP Chinese website!
Linux: A Look at Its Fundamental StructureApr 16, 2025 am 12:01 AMThe basic structure of Linux includes the kernel, file system, and shell. 1) Kernel management hardware resources and use uname-r to view the version. 2) The EXT4 file system supports large files and logs and is created using mkfs.ext4. 3) Shell provides command line interaction such as Bash, and lists files using ls-l.
Linux Operations: System Administration and MaintenanceApr 15, 2025 am 12:10 AMThe key steps in Linux system management and maintenance include: 1) Master the basic knowledge, such as file system structure and user management; 2) Carry out system monitoring and resource management, use top, htop and other tools; 3) Use system logs to troubleshoot, use journalctl and other tools; 4) Write automated scripts and task scheduling, use cron tools; 5) implement security management and protection, configure firewalls through iptables; 6) Carry out performance optimization and best practices, adjust kernel parameters and develop good habits.
Understanding Linux's Maintenance Mode: The EssentialsApr 14, 2025 am 12:04 AMLinux maintenance mode is entered by adding init=/bin/bash or single parameters at startup. 1. Enter maintenance mode: Edit the GRUB menu and add startup parameters. 2. Remount the file system to read and write mode: mount-oremount,rw/. 3. Repair the file system: Use the fsck command, such as fsck/dev/sda1. 4. Back up the data and operate with caution to avoid data loss.
How Debian improves Hadoop data processing speedApr 13, 2025 am 11:54 AMThis article discusses how to improve Hadoop data processing efficiency on Debian systems. Optimization strategies cover hardware upgrades, operating system parameter adjustments, Hadoop configuration modifications, and the use of efficient algorithms and tools. 1. Hardware resource strengthening ensures that all nodes have consistent hardware configurations, especially paying attention to CPU, memory and network equipment performance. Choosing high-performance hardware components is essential to improve overall processing speed. 2. Operating system tunes file descriptors and network connections: Modify the /etc/security/limits.conf file to increase the upper limit of file descriptors and network connections allowed to be opened at the same time by the system. JVM parameter adjustment: Adjust in hadoop-env.sh file
How to learn Debian syslogApr 13, 2025 am 11:51 AMThis guide will guide you to learn how to use Syslog in Debian systems. Syslog is a key service in Linux systems for logging system and application log messages. It helps administrators monitor and analyze system activity to quickly identify and resolve problems. 1. Basic knowledge of Syslog The core functions of Syslog include: centrally collecting and managing log messages; supporting multiple log output formats and target locations (such as files or networks); providing real-time log viewing and filtering functions. 2. Install and configure Syslog (using Rsyslog) The Debian system uses Rsyslog by default. You can install it with the following command: sudoaptupdatesud
How to choose Hadoop version in DebianApr 13, 2025 am 11:48 AMWhen choosing a Hadoop version suitable for Debian system, the following key factors need to be considered: 1. Stability and long-term support: For users who pursue stability and security, it is recommended to choose a Debian stable version, such as Debian11 (Bullseye). This version has been fully tested and has a support cycle of up to five years, which can ensure the stable operation of the system. 2. Package update speed: If you need to use the latest Hadoop features and features, you can consider Debian's unstable version (Sid). However, it should be noted that unstable versions may have compatibility issues and stability risks. 3. Community support and resources: Debian has huge community support, which can provide rich documentation and
TigerVNC share file method on DebianApr 13, 2025 am 11:45 AMThis article describes how to use TigerVNC to share files on Debian systems. You need to install the TigerVNC server first and then configure it. 1. Install the TigerVNC server and open the terminal. Update the software package list: sudoaptupdate to install TigerVNC server: sudoaptinstalltigervnc-standalone-servertigervnc-common 2. Configure TigerVNC server to set VNC server password: vncpasswd Start VNC server: vncserver:1-localhostno
Debian mail server firewall configuration tipsApr 13, 2025 am 11:42 AMConfiguring a Debian mail server's firewall is an important step in ensuring server security. The following are several commonly used firewall configuration methods, including the use of iptables and firewalld. Use iptables to configure firewall to install iptables (if not already installed): sudoapt-getupdatesudoapt-getinstalliptablesView current iptables rules: sudoiptables-L configuration


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver CS6
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.







