Understanding Linux: Kernel, Shell, Filesystem and Core Components Explained
This comprehensive guide breaks down the four main parts of a Linux system—kernel, shell, filesystem and applications—detailing kernel subsystems such as memory and process management, shell variants, file types, directory hierarchy, partition handling, VFS, mounting procedures, link types and essential command‑line tools, while also touching on application bundles and kernel parameter tuning.
1. Linux Kernel
The kernel is the core of the operating system, handling process, memory, device driver, file and network management, which directly impacts system performance and stability.
1.1 Memory Management
Linux uses virtual memory to map physical memory into 4 KB pages, providing mechanisms such as the slab allocator and page swapping. Source code resides in ./linux/mm.
1.2 Process Management
Processes are scheduled using time slices; the scheduler selects the next runnable process based on priority. Linux supports inter‑process communication via signals, pipes, shared memory, semaphores and sockets. System calls like fork, exec, kill and exit are exposed through the SCI layer.
1.3 Filesystem
Linux adopts a unified Virtual File System (VFS) that abstracts diverse filesystem implementations (ext2, FAT, NTFS, etc.) behind a common API. VFS sits above the buffer cache and device drivers, allowing user processes to access files without knowing the underlying filesystem type.
1.4 Device Drivers
Device drivers run in high‑privilege mode and provide abstract interfaces for hardware. Errors in drivers can crash the whole system.
1.5 Network Stack
The network subsystem implements BSD sockets and the full TCP/IP protocol suite, with architecture‑specific code under ./linux/arch.
2. Linux Shell
The shell is the user interface that interprets commands and passes them to the kernel. Common shells include:
Bourne Shell (sh)
BASH – GNU Bourne Again Shell (default on most distributions)
Korn Shell (ksh)
C Shell (csh)
3. Linux Filesystem
3.1 File Types
Regular files (text, binaries, scripts)
Directory files
Link files (hard and symbolic)
Device files (block and character devices under /dev)
FIFO (named pipe) files
Socket files
3.2 Directory Structure
Linux uses a single hierarchical tree starting at /. Key directories include /bin, /sbin, /etc, /home, /usr, /var, /tmp, /proc, /dev, and /mnt. Each serves a specific purpose such as binaries, system configuration, user data, temporary files, virtual process information, device nodes and mount points.
3.3 Disk Partitions
Partitions are identified as /dev/hd[a‑z][X] or /dev/sd[a‑z][X]. Types include Primary, Extended and Logical partitions. Example output of fdisk -l shows partition tables and sizes.
3.4 Filesystem Types and Features
Common Linux filesystems: ext2, ext3 (journaled), ext4, XFS, JFS, ReiserFS, Btrfs, etc. Each provides a superblock, inode table and data blocks. Inodes store metadata (permissions, timestamps, ownership) while data blocks hold file contents. The superblock records overall filesystem statistics.
3.5 VFS Representation in the Kernel
Key kernel structures: file – represents an opened file, holds flags and file offset. file_operations – function pointers for read, write, ioctl, etc. dentry – cached directory entry, maps paths to inodes. inode – stores metadata and points to inode_operations. super_block – contains filesystem‑wide information and the root dentry.
3.6 Mounting Filesystems
Mounting attaches a filesystem's root directory to a mount point in the existing tree. The basic syntax is: mount [-t fstype] [-o options] device mount_point Common options include ro, rw, user, nouser, codepage=, and iocharset=. Example to mount a Windows FAT partition: # mount -t vfat /dev/hda5 /mnt/winc Automatic mounting at boot is configured in /etc/fstab, where each line specifies device, mount point, filesystem type and options.
3.7 Links
Hard links share the same inode; they cannot cross filesystem boundaries. Symbolic (soft) links are special files that store a pathname to the target and can span filesystems. Commands:
ln source_file hard_link
ln -s source_file soft_link3.8 Essential File‑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,
find4. Linux Applications
Typical distributions ship with text editors, programming language runtimes, X Window system, office suites, internet tools and databases.
5. Kernel Parameter Tuning
Kernel parameters are exposed via the /proc filesystem. Adjusting values in /proc/sys (or via sysctl) can improve performance without recompiling the kernel.
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.
IT Architects Alliance
Discussion and exchange on system, internet, large‑scale distributed, high‑availability, and high‑performance architectures, as well as big data, machine learning, AI, and architecture adjustments with internet technologies. Includes real‑world large‑scale architecture case studies. Open to architects who have ideas and enjoy sharing.
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.
