Understanding Linux: Kernel, Shell, Filesystems, and System Architecture Explained
This comprehensive guide explores Linux's core components—including the kernel, shell, memory and process management, file systems, device drivers, network interfaces, mounting mechanisms, and link types—providing clear explanations, diagrams, and command examples for anyone learning operating system fundamentals.
Linux System Overview
Linux systems consist of four main parts: the kernel, shell, file system, and applications. Together they form the basic OS structure that lets users run programs, manage files, and interact with the system.
1. Linux Kernel
The kernel is the core of the OS, handling process, memory, device driver, file, and network management, which determines system performance and stability.
Key kernel components include memory management, process management, file system, device drivers, and network interfaces.
1.1 Memory Management
Linux uses virtual memory, dividing memory into 4 KB pages. It manages physical and virtual memory, supports slab allocation, and can swap pages to disk when memory is exhausted. Source code resides in ./linux/mm.
1.2 Process Management
Processes are execution entities of applications. Linux achieves multitasking by time‑slicing processes, using a priority‑based scheduler. Inter‑process communication mechanisms include signals, pipes, shared memory, semaphores, and sockets. System calls for creating, terminating, and synchronising processes are provided via the SCI layer.
1.3 File System
Linux supports many file systems (e.g., Ext2/3, FAT, VFAT, NTFS, XFS). The Virtual File System (VFS) abstracts hardware details, offering a uniform API for over 50 file system types. VFS sits between the user space and specific file system implementations.
1.4 Device Drivers
Device drivers run in high‑privilege mode, directly controlling hardware. They provide abstract interfaces for the OS while handling hardware‑specific operations. Examples include SCSI and IDE drivers.
1.5 Network Interface (NET)
Linux supports BSD sockets and the TCP/IP protocol suite. The network stack consists of socket interfaces, protocol layers, and device drivers for hardware communication.
2. Linux Shell
The shell is the user interface to the kernel, interpreting commands and providing scripting capabilities. Common shells are Bourne Shell, Bash (Bourne Again Shell), Korn Shell, and C Shell.
3. Linux File System Details
3.1 File Types
Regular files (text or binary)
Directory files
Link files (hard links)
Device files (block or character)
FIFO (named pipes)
Socket files
Commands like ls -l, file, and stat display file type information.
3.2 Linux Directory Structure
Linux uses a single hierarchical tree rooted at /. Important directories include /bin, /sbin, /etc, /home, /usr, /var, /tmp, /dev, /proc, and /mnt. Each serves specific purposes such as binaries, configuration, user homes, temporary files, and mount points.
3.3 Disk Partitions
Linux distinguishes primary, extended, and logical partitions. Devices are identified as /dev/hdX (IDE) or /dev/sdX (SCSI/SATA). Partition numbers 1‑4 denote primary/extended; numbers ≥5 denote logical partitions.
3.4 Mounting Filesystems
Mounting attaches a filesystem's top directory to a mount point in the existing tree. The mount command syntax is mount [-t type] [-o options] device mount_point. The /etc/fstab file lists filesystems to be mounted automatically at boot.
3.5 Links
Hard links share the same inode, cannot cross filesystems, and do not work for directories. Symbolic (soft) links are special files containing the target path and can span filesystems.
3.6 VFS and Kernel Data Structures
Each process has a file descriptor table pointing to struct file objects, which reference struct file_operations for actual I/O functions. struct dentry caches directory entries and points to struct inode, which holds metadata and points to struct super_block describing the filesystem.
3.7 Example Code
# 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 / Solaris4. Common Linux Commands
Disk and file space: fdisk, df, du. File and directory management: cd, pwd, mkdir, rmdir, ls, cp, mv, rm. Viewing file contents: cat, more, less, head, tail. Permissions: chmod, chown, chgrp, umask. Searching files: which, whereis, locate, find.
5. Kernel Parameter Optimization
Kernel parameters are exposed via the /proc filesystem, allowing runtime tuning of performance characteristics.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
