Understanding Linux: Kernel, Shell, Filesystem, and Core Components Explained
This article provides a comprehensive overview of Linux's core components—including the kernel, shell, virtual file system, memory and process management, device drivers, networking, and disk partitioning—explaining their roles, structures, and how they interact within the operating system.
Linux System Overview
Linux typically consists of four main 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 heart of the operating system, handling processes, memory, device drivers, files, and networking, which directly affect performance and stability.
Key kernel subsystems include memory management, process management, device drivers, the file system, and network management. The system call interface (SCI) resides in ./linux/kernel with architecture‑specific code in ./linux/arch.
Memory Management
Linux uses virtual memory to map physical memory into 4 KB pages, allowing large applications to run on limited RAM. The slab allocator abstracts 4 KB pages for efficient allocation, and swapping moves unused pages to disk. Source code is located in ./linux/mm.
Process Management
Processes are independent execution entities. Linux achieves multitasking by time‑slicing CPU access, with a priority‑based scheduler selecting the next runnable process. Inter‑process communication (IPC) mechanisms include signals, pipes, shared memory, semaphores, and sockets.
File System
Unlike DOS/Windows, Linux presents a single hierarchical tree rooted at /. The Virtual File System (VFS) abstracts hardware details, providing a uniform API for operations such as open, close, read, and write. VFS sits above specific file‑system implementations (e.g., Ext2, Ext3, XFS) and below a buffer cache that optimizes block access.
Key file‑system structures:
Superblock – stores overall file‑system metadata (size, block count, etc.).
Inode – records file attributes (owner, permissions, timestamps) and pointers to data blocks.
Data blocks – contain the actual file contents.
Linux supports many file‑system types (Ext2/3, FAT, VFAT, NTFS, XFS, JFS, ReiserFS, etc.). Ext2/3 are indexed allocation file systems that rarely need defragmentation, whereas FAT uses linked allocation and may require frequent defragmentation.
Device Drivers
Device drivers run in high‑privilege mode to control hardware. Errors in drivers can crash the system. Drivers provide abstract interfaces for the kernel while handling hardware‑specific operations (e.g., SCSI vs. IDE).
Network Interface (NET)
Linux implements BSD sockets and supports the full TCP/IP suite. The network stack consists of socket APIs, protocol layers, and device drivers.
Linux Shell
The shell is the user interface that interprets commands and invokes kernel services. Common shells include Bourne Shell, Bash (Bourne Again Shell), Korn Shell, and C Shell.
Files and Directories
File types in Linux:
Regular files (text or binary)
Directories
Links (hard and symbolic)
Device files (block and character)
FIFO (named pipes)
Socket files
Important directories and their purposes: /bin – essential binaries /dev – device nodes /etc – system configuration /home – user home directories /lib – shared libraries /sbin – system administration binaries /tmp – temporary files /var – variable data (logs, caches) /usr – secondary hierarchy (applications, source, docs)
Disk Partitions
Linux distinguishes primary, extended, and logical partitions. Devices are identified as /dev/hdX (IDE) or /dev/sdX (SCSI/SATA), with partition numbers appended (e.g., /dev/sda1). Example fdisk -l output:
# fdisk -l</code>
<code>Disk /dev/hda: 80.0 GB, 80026361856 bytes</code>
<code>255 heads, 63 sectors/track, 9729 cylinders</code>
<code>Units = cylinders of 16065 * 512 = 8225280 bytes</code>
<code>Device Boot Start End Blocks Id System</code>
<code>/dev/hda1 * 1 970 7791493+ 7 HPFS/NTFS</code>
<code>/dev/hda2 971 9729 70356667+ 5 Extended</code>
<code>/dev/hda5 971 2915 15623181 b W95 FAT32</code>
<code>/dev/hda6 2916 4131 9767488+ 83 linux</code>
<code>/dev/hda7 4132 5590 11719386 83 linux</code>
<code>/dev/hda8 5591 6806 9767488+ 83 linux</code>
<code>/dev/hda9 6807 9657 22900626 83 linux</code>
<code>/dev/hda10 9658 9729 578308+ 82 linux swap / SolarisMounting Filesystems
Each partition must be mounted to a directory (the mount point) to become accessible. The mount command syntax is: mount [-options] device mount_point Common options: -t – specify filesystem type -o – mount options (e.g., ro, rw, user, noauto)
Automatic mounting at boot is configured in /etc/fstab. Example entries:
/dev/hda2 / ext3 defaults 1 1</code>
<code>/dev/hda1 /boot ext3 defaults 1 2</code>
<code>/dev/hdb1 /mnt/winc vfat defaults,codepage=936,iocharset=cp936 0 0</code>
<code>/dev/hda5 /mnt/wind vfat defaults,codepage=936,iocharset=cp936 0 0Hard and Symbolic Links
Use ln to create additional references to a file without copying its contents.
Hard link – multiple directory entries share the same inode; cannot cross filesystem boundaries.
Symbolic (soft) link – a special file containing the pathname of the target; similar to Windows shortcuts.
Differences:
Hard links share the same inode number; symbolic links have distinct inodes.
Removing the original file invalidates a symbolic link but not a hard link.
Both reflect changes to the target file's contents.
Useful Commands
fdisk, df, du – disk and space management cd, pwd, mkdir, rmdir, ls, cp, mv, rm – file navigation and manipulation cat, more, less, head, tail – view file contents chmod, chown, chgrp, umask – permissions which, whereis, locate, find – locate files
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.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
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.
