Fundamentals 35 min read

Understanding Linux: Kernel, Shell, Filesystem, and Disk Partitions Explained

This article provides a comprehensive overview of Linux's core components—including the kernel, shell, virtual file system, various filesystem types, directory hierarchy, disk partition schemes, mounting procedures, and linking mechanisms—while illustrating key concepts with commands, code snippets, and diagrams for practical system administration.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Understanding Linux: Kernel, Shell, Filesystem, and Disk Partitions Explained

Linux System Architecture

Linux consists of four core components: the kernel, the shell, the file system, and user applications. Together they provide process execution, file management, and hardware interaction.

Kernel

The kernel is the operating system core. It manages memory, processes, device drivers, file systems, and networking. Relevant source code resides in ./linux/mm (memory), ./linux/kernel and architecture‑specific code in ./linux/arch, and drivers in ./linux/drivers.

Memory Management

Linux uses virtual memory with 4 KB pages. The slab allocator builds on these pages to allocate kernel objects dynamically. When physical memory is exhausted, pages are swapped to disk (swap space).

Process Management

Processes are scheduled by a priority‑based scheduler using time slices. Inter‑process communication includes signals, pipes, shared memory, semaphores, and sockets. Key system calls are fork, exec, kill, and exit.

Device Drivers

Device drivers run in high‑privilege mode and expose abstract interfaces to the kernel. They are located under ./linux/drivers and are specific to hardware classes (e.g., SCSI, IDE).

Shell

The shell is the command‑line interpreter that forwards user commands to the kernel. Common shells are Bourne Shell, Bash (default on most distributions), Korn Shell, and C Shell.

File System

Linux unifies all storage devices through the Virtual File System (VFS) layer, which provides a generic API ( open, close, read, write) independent of the underlying filesystem implementation.

VFS Core Structures

Key VFS structures are:

file – represents an opened file descriptor.

dentry – directory entry cache.

inode – stores file metadata and block pointers.

super_block – holds filesystem‑wide information.

Source code for VFS resides in ./linux/fs.

Supported Filesystem Types

Ext2 / Ext3 (native Linux, Ext3 adds journaling)

FAT, VFAT, FAT32 (Windows compatible)

NTFS (Windows NT/XP)

ISO9660 (CD/DVD)

XFS, JFS, ReiserFS, Btrfs, NFS, SMBFS, etc.

Mounting Filesystems

Every partition must be mounted onto a directory (mount point) before it can be accessed. The generic mount command syntax is:

mount [-t fstype] [-o options] <device> <mount_point>

Common options: -t <fstype> – specify filesystem type. -o – comma‑separated mount flags such as ro, rw, noauto, user, codepage=, iocharset=.

Example commands:

sudo mount -t vfat /dev/hda5 /mnt/winc          # mount a FAT32 partition
sudo mount -t iso9660 /dev/cdrom /mnt/cdrom   # mount a CD‑ROM
sudo mount -t vboxsf myshare /media/share      # mount a VirtualBox shared folder

/etc/fstab Automatic Mounting

The /etc/fstab file defines filesystems to be mounted at boot. Each line follows the format:

<device> <mount_point> <fstype> <options> <dump> <pass>

Example entry for a Windows partition with Chinese filename support:

/dev/hdb1 /mnt/winc vfat defaults,codepage=936,iocharset=cp936 0 0

Links

Linux supports hard links (share the same inode, cannot cross filesystem boundaries) and symbolic (soft) links (special files containing a pathname).

# Hard link
ln source_file hard_link
# Symbolic link
ln -s target_path soft_link

Essential Commands

Disk/partition information: fdisk -l Filesystem usage: df, du File navigation and manipulation: cd, pwd, mkdir, rmdir, ls, cp, mv, rm Viewing file contents: cat, more, less, head, tail Permission management: chmod, chown, chgrp, umask Searching: which, whereis, locate,

find

Kernel Parameter Tuning

Kernel parameters are exposed via the /proc filesystem and can be modified at runtime. Typical tunables include: vm.swappiness – controls swap aggressiveness. fs.file-max – maximum number of file handles.

Network buffers such as net.core.rmem_max and net.core.wmem_max.

Disk Partitioning and Device Naming

Linux identifies disks and partitions as /dev/hd[a‑z]X (IDE) or /dev/sd[a‑z]X (SCSI/SATA). Partition types:

Primary partition – directly usable, up to four per disk.

Extended partition – container for logical partitions.

Logical partition – created inside an extended partition, unlimited number.

Use fdisk -l to list devices and partitions.

Standard Directory Hierarchy

/bin   – essential user binaries
/dev   – device special files
/etc   – system configuration files
/home  – user home directories
/lib   – shared libraries (runtime)
/sbin  – system administration binaries
/tmp   – temporary files (cleared on reboot)
/var   – variable data (logs, spools)
/usr   – secondary hierarchy (applications, docs, libraries)
/proc  – virtual procfs exposing kernel information

This summary captures the essential technical concepts of Linux kernel subsystems, shell interaction, VFS architecture, filesystem types, mounting procedures, link handling, common command‑line tools, kernel parameter tuning, partition naming, and the standard directory layout.

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.

KernelLinuxFilesystemDisk Partition
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

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.