Fundamentals 35 min read

Unlocking Linux: Inside the Kernel, Shell, Filesystem, and Core Components

This comprehensive guide explores Linux’s four core components—kernel, shell, filesystem, and applications—detailing kernel architecture, memory and process management, VFS, device drivers, network interfaces, shell types, file types, directory structures, mounting, and essential command-line tools for system administration.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Unlocking Linux: Inside the Kernel, Shell, Filesystem, and Core Components

1. Linux Kernel

The kernel is the core of the operating system, managing processes, memory, device drivers, files, and network systems, which determines system performance and stability.

Linux kernel components include memory management, process management, device drivers, filesystem, and network management.

System call interface (SCI) provides mechanisms for user‑space to kernel function calls; implementations reside in ./linux/kernel and architecture‑specific parts in ./linux/arch.

1.1 Memory Management

Linux uses virtual memory, dividing memory into 4 KB pages and employing mechanisms such as the slab allocator to track page usage. When physical memory is exhausted, pages are swapped to disk. Source code is in ./linux/mm.

1.2 Process Management

Processes are scheduled using time slices; the scheduler selects the next process based on priority. Linux provides inter‑process communication mechanisms like signals, pipes, shared memory, semaphores, and sockets.

1.3 Filesystem

Linux adopts a hierarchical VFS (Virtual File System) that abstracts various underlying filesystems (e.g., ext2, ext3, FAT, NTFS). VFS offers a uniform API for operations such as open, close, read, and write.

1.4 Device Drivers

Device drivers run in high‑privilege mode, providing abstract interfaces for hardware interaction. Errors in drivers can crash the system.

1.5 Network Interface (NET)

Linux supports BSD sockets and the full TCP/IP stack, with network protocols and drivers forming the network subsystem.

2. 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.

3. Linux Filesystem

Linux supports many filesystem types (ext2, ext3, FAT, VFAT, ISO9660, etc.).

3.1 File Types

Regular files (text, binaries, scripts)

Directory files

Link files (hard and symbolic links)

Device files (block and character devices)

FIFO (named pipes)

Socket files

3.2 Linux Directories

Standard hierarchy includes /, /usr, /var, /home, /etc, /bin, /sbin, /dev, /proc, /tmp, /mnt, /lost+found, and others, each serving specific purposes such as binaries, libraries, configuration, temporary files, and mount points.

3.3 Disk Partitions

Linux distinguishes primary, extended, and logical partitions, identified as /dev/hdaX or /dev/sdX. Partition information can be listed with fdisk -l.

3.4 Important Directories

/bin

– executable commands /dev – special device files /etc – system configuration /home – user home directories /lib – shared libraries /sbin – system administration commands /tmp – temporary files /root – root user home /mnt – temporary mount points /proc – virtual process information /var – variable data (logs, caches) /usr – user applications and documentation

3.5 Filesystem Types

ext2   – early Linux filesystem
ext3   – ext2 with journaling
RAMFS  – in‑memory filesystem
NFS    – network filesystem (SUN)
MS‑DOS – MS‑DOS filesystem
VFAT   – Windows 95/98 filesystem
FAT    – Windows XP filesystem
NTFS   – Windows NT/XP filesystem
HPFS   – OS/2 filesystem
PROC   – virtual process filesystem
ISO9660– CD-ROM filesystem
XFS    – SGI advanced journaling filesystem
JFS    – IBM AIX journaling filesystem
ReiserFS– balanced‑tree filesystem
udf    – writable optical disc filesystem

3.6 Filesystem in the Kernel (VFS)

VFS structures include file, dentry, inode, and super_block. Each process has a file descriptor table pointing to file structures, which reference file_operations. Inodes store metadata; superblocks store filesystem-wide information.

3.7 Mounting Filesystems

Mounting attaches a filesystem’s root directory to a directory in the existing hierarchy (the mount point). The mount command syntax is mount [-options] device mount_point. Common options include -t (type), -o (options such as ro, rw, user, nouser).

3.8 Automatic Mounting

Entries in /etc/fstab define filesystems to mount at boot. Example lines show mounting Windows partitions with vfat and appropriate codepage/charset options.

3.9 Hard and Symbolic Links

Hard links share the same inode; they cannot cross filesystem boundaries. Symbolic (soft) links are special files containing a pathname to the target and can span filesystems.

3.10 File and Directory Management Commands

Disk/space: fdisk, df, du Navigation: cd, pwd, mkdir, rmdir File operations: ls, cp, mv, rm Viewing content: cat, more, less, head, tail Permissions: chmod, chown, chgrp, umask Search: which, whereis, locate,

find

4. Linux Applications

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

5. Linux Kernel Parameter Optimization

Kernel parameters, accessible via the /proc filesystem, allow 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.

KernelLinuxOperating Systemvfs
MaGe Linux Operations
Written by

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.

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.