Fundamentals 36 min read

How to Truly Understand Linux System Architecture?

This article explains the four main components of a Linux system—kernel, shell, file system, and applications—detailing kernel subsystems, memory and process management, the virtual file system, device drivers, network stack, mounting mechanisms, partition types, link types, and common administration commands.

Linux Tech Enthusiast
Linux Tech Enthusiast
Linux Tech Enthusiast
How to Truly Understand Linux System Architecture?

Linux System Overview

Linux generally consists of four major parts: the kernel, the shell, the file system, and applications. Together they enable users to run programs, manage files, and interact with the system.

Linux Kernel

The kernel is the core of the operating system, handling process, memory, device driver, file, and network management, which determines system performance and stability.

Kernel components include memory management, process management, device drivers, file system support, and network management. The system call interface (SCI) provides a mechanism for user‑space programs to invoke kernel functions; its implementation resides in ./linux/kernel and architecture‑specific parts in ./linux/arch.

Memory Management

Linux uses virtual memory to allow limited physical RAM to satisfy large application demands, dividing memory into 4 KB pages. The SLAB allocator abstracts these pages to allocate structures and track usage. When physical memory is exhausted, pages are swapped to disk. Source code is located in ./linux/mm.

Process Management

A process is an executing instance of a program. Linux achieves multitasking by time‑slicing processes, with a scheduler selecting the next process based on priority. Processes have separate address spaces, preventing interference. Inter‑process communication mechanisms include signals, pipes, shared memory, semaphores, and sockets. The kernel exposes APIs such as fork, exec, kill, exit, and signal via SCI.

File System

Unlike DOS, Linux does not use drive letters; instead it builds a hierarchical tree of file systems mounted at directories. The Virtual File System (VFS) abstracts hardware details, providing a uniform API for operations like open, close, read, and write. File system source code resides in ./linux/fs.

Device Drivers

Device drivers run in high‑privilege mode and directly control hardware. Errors in drivers can crash the OS. Drivers expose abstract interfaces to the kernel while handling hardware‑specific details (e.g., SCSI vs. IDE drivers).

Network Interface (NET)

Linux supports BSD sockets and the full TCP/IP suite. The network stack consists of protocol layers and device drivers, each handling specific hardware.

Linux Shell

The shell is the user interface that interprets commands and passes them to the kernel. Common shells include Bourne Shell, Bash (GNU Bourne‑Again Shell), Korn Shell, and C Shell.

Linux File Systems

Linux supports many file systems: Ext2, Ext3, FAT, VFAT, FAT32, MINIX, NTFS, XFS, JFS, ReiserFS, etc. The most common native file system is Ext2/Ext3.

File Types

Regular files (text, binaries)

Directory files

Link files (hard and symbolic)

Device files (block and character)

FIFO (named pipe) files

Socket files

Commands such as ls -l, file, and stat display file type information.

Directory Structure

Linux uses a single root directory ( /) with subdirectories like /bin, /dev, /etc, /home, /usr, /var, etc., each serving specific purposes (executables, device nodes, configuration, user homes, libraries, logs, etc.).

Disk Partitions

Partitions are classified as primary, extended, or logical. Device names follow /dev/hd[a‑z]X or /dev/sd[a‑z]X, where the letter identifies the disk and the number identifies the partition. Example fdisk -l output:

# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 970 7791493+ 7 HPFS/NTFS
/dev/hda2 971 9729 70356667+ 5 Extended
/dev/hda5 971 2915 15623181 b W95 FAT32
/dev/hda6 2916 4131 9767488+ 83 linux
/dev/hda7 4132 5590 11719386 83 linux
/dev/hda8 5591 6806 9767488+ 83 linux
/dev/hda9 6807 9657 22900626 83 linux
/dev/hda10 9658 9729 578308+ 82 linux swap / Solaris

Mounting File Systems

Each partition is a file system that must be mounted to a directory (mount point) to be accessed. The mount command syntax is mount [-options] [device] [mount‑point]. Common options include -t to specify the file system type and -o for additional flags (e.g., ro, rw, user).

Examples: # mount -t vfat /dev/hda5 /mnt/winc Mounting a CD-ROM: # mount -t iso9660 /dev/cdrom /mnt/cdrom Mounting a VirtualBox shared folder:

# sudo mount -t vboxsf myshare /media/share

Automatic Mounting via /etc/fstab

The /etc/fstab file lists file systems to be mounted at boot. Example entries:

/dev/hda2 / ext3 defaults 1 1
/dev/hda1 /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,codepage=936,iocharset=gb2312 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hdb1 /mnt/winc vfat defaults,codepage=936,iocharset=cp936 0 0
/dev/hda5 /mnt/wind vfat defaults,codepage=936,iocharset=cp936 0 0

Options such as rw, suid, dev, exec, auto, nouser, and async control mount behavior.

Hard Links and Symbolic Links

Hard links point to the same inode as the original file; they cannot cross file‑system boundaries. Symbolic (soft) links contain the pathname of the target and can span file systems. Deleting the original file invalidates a symbolic link but not a hard link.

File Management Commands

Disk and space: fdisk, df, du Navigation and manipulation: cd, pwd, mkdir, rmdir, ls, cp, rm, mv Viewing content: cat, tac, more, less, head, tail Permissions: chmod, chown, chgrp, umask Searching: which, whereis, locate,

find

Linux Applications

Standard Linux installations include text editors, programming languages, X Window System, office suites, internet tools, and databases.

Kernel Parameter Optimization

Kernel parameters are exposed via the /proc filesystem, allowing runtime tuning of system performance.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Memory ManagementKernelProcess ManagementLinuxOperating SystemFile System
Linux Tech Enthusiast
Written by

Linux Tech Enthusiast

Focused on sharing practical Linux technology content, covering Linux fundamentals, applications, tools, as well as databases, operating systems, network security, and other technical knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.