Unlocking Linux: Inside the Kernel, Shell, Filesystem & Disk Management
This article explains the four core parts of a Linux system—kernel, shell, filesystem and applications—covering memory and process management, VFS architecture, file types, directory hierarchy, partitioning, mounting, links and essential command‑line tools.
Linux System Overview
Linux systems consist of four main components: the kernel, the shell, the file system and applications. The kernel provides the core services such as process, memory, device‑driver, file and network management.
1. Linux Kernel
Memory management uses virtual memory, page allocation, a slab allocator and swapping to disk when physical RAM is exhausted. Process management implements multitasking with short time slices and a priority‑based scheduler, providing inter‑process communication mechanisms such as signals, pipes, shared memory, semaphores and sockets. The kernel also offers a system‑call interface (SCI) for creating, terminating and synchronising processes.
2. Linux Shell
The shell is the user interface that interprets commands and passes them to the kernel. Common shells include Bourne, Bash, Korn and C shell.
3. File System
Linux uses a unified Virtual File System (VFS) that abstracts various concrete file systems (ext2, ext3, ext4, FAT, VFAT, NTFS, XFS, JFS, ReiserFS, etc.). VFS provides generic APIs such as open, close, read and write and maps them to specific file‑system implementations. All files appear in a single hierarchical tree rooted at “/”.
3.1 File System Types
Typical Linux file systems include ext2, ext3, ext4, RAMFS, NFS, FAT, VFAT, NTFS, XFS, JFS, ReiserFS, ISO9660, UDF and many others.
3.2 Directory Structure
Standard top‑level directories and their purposes:
/bin – binary executables
/sbin – system administration commands
/etc – configuration files
/dev – device special files
/proc – virtual process information
/var – variable data such as logs
/home – user home directories
/usr – majority of user applications and libraries
/mnt – temporary mount points
/root – root user home
/boot – boot loader files
/lib – shared libraries
/tmp – temporary files
/lost+found – recovered files after crashes
3.3 Disk Partitions and Mounting
Linux identifies disks and partitions as /dev/hda, /dev/hdb, /dev/sda, etc. Partitions can be primary, extended or logical. A partition must be mounted onto a directory (mount point) to become accessible. The mount command and the /etc/fstab file control automatic mounting, with options such as ro, rw, user, codepage, iocharset, noauto, etc.
# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
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 # mount -t vfat /dev/hda5 /mnt/winc3.4 Links
Hard links share the same inode as the original file; they cannot cross file‑system boundaries and cannot be created for directories. Symbolic (soft) links are special files that contain the pathname of the target and behave like shortcuts.
3.5 Common Commands
Disk and file‑system utilities: fdisk, df, du. Directory operations: cd, pwd, mkdir, rmdir, ls, cp, mv, rm. File viewing: cat, more, less, head, tail. Permission management: chmod, chown, chgrp, umask. Search utilities: which, whereis, locate, find.
Author: Real Home
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.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
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.
