Fundamentals 35 min read

Understanding Linux: Kernel, Shell, Filesystem, and Core Concepts

This article provides a comprehensive overview of Linux fundamentals, covering the kernel's memory and process management, the virtual file system, device drivers, network stack, shell variants, file types, directory hierarchy, disk partitioning, mounting procedures, and link mechanisms, all illustrated with practical command examples.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Understanding Linux: Kernel, Shell, Filesystem, and Core Concepts

Linux System Overview

Linux consists of four primary components: the kernel, the shell, the filesystem, and user applications. The kernel provides process scheduling, memory management, device drivers, a virtual file system (VFS) and networking. The shell is a command‑line interpreter that forwards user commands to the kernel.

Kernel Subsystems

Memory Management – virtual memory is divided into 4 KB pages. The SLAB allocator abstracts these pages for kernel structures. When physical memory is exhausted pages are swapped to disk. Source code resides in ./linux/mm.

Process Management – each program runs as a process. The scheduler uses time slices and priority‑based selection. Inter‑process communication includes signals, pipes, shared memory, semaphores and sockets. System calls such as fork, exec, kill and exit are provided via the SCI layer. Core code is under ./linux/kernel with architecture‑specific parts in ./linux/arch.

Filesystem (VFS) – a unified hierarchical namespace. VFS abstracts concrete filesystems (ext2, ext3, vfat, ntfs, xfs, …) and offers a common API: open, read, write, close. Filesystem drivers are located in ./linux/fs.

Device Drivers – run in kernel space with high privileges, translating hardware operations into kernel interfaces. Faulty drivers can crash the whole system.

Network Stack – implements BSD sockets and the full TCP/IP suite. Hardware driver modules handle device communication; protocol layers provide routing, addressing and transport.

Shell

The shell interprets user input, launches programs and provides scripting capabilities. Common shells are Bourne, Bash (Bourne Again Shell), Korn and C Shell.

File Types

Regular files (text or binary)

Directories

Hard links and symbolic links

Device files ( /dev block and character)

FIFO (named pipe)

Socket files

Commands such as ls -l, file and stat display a file’s type and attributes.

Standard Directory Layout

/bin

– essential binaries /sbin – system administration binaries /etc – configuration files /dev – device nodes /proc – virtual process information /home – user home directories /usr – secondary hierarchy (applications, libraries, source) /var – variable data (logs, spools) /tmp – temporary files /mnt and /media – mount points for removable media

Disk Partitions

Linux distinguishes primary, extended and logical partitions. Device names follow /dev/hd[a‑z][1‑4] for IDE disks and /dev/sd[a‑z][1‑…] for SCSI/SATA disks. Logical partitions start at number 5.

fdisk -l

Mounting Filesystems

Each partition must be attached to a directory (mount point). Basic syntax: mount [-options] [device] [mount_point] Common options: ro – read‑only rw – read‑write user – allow non‑root users to mount codepage=XXX – set character code page iocharset=XXX – set I/O character set

Example – mount a FAT32 partition: # mount -t vfat /dev/hda5 /mnt/winc Persistent mounts are defined in /etc/fstab:

/dev/hda2   /      ext3   defaults   1 1
/dev/hda1   /boot  ext3   defaults   1 2
/dev/hda5   /mnt/winc vfat defaults,codepage=936,iocharset=cp936 0 0

Hard and Symbolic Links

Hard links share the same inode and cannot cross filesystem boundaries. Symbolic links store a pathname and may span filesystems.

Essential Commands

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

find

VFS Internals

Each process maintains a file‑descriptor table that points to struct file objects. struct file holds flags, the current file offset, a reference count and a pointer to struct file_operations (function pointers for read, write, ioctl, etc.).

Path resolution uses the dentry cache: a struct dentry represents a directory entry and points to an struct inode. The inode stores metadata (owner, permissions, timestamps) and a pointer to struct super_block, which describes the filesystem type, block size and the root dentry ( s_root) where the filesystem is mounted.

Kernel Parameter Tuning

Kernel parameters are exposed via the /proc filesystem (e.g., /proc/sys/vm/swappiness, /proc/sys/net/ipv4/ip_forward) and can be modified at runtime to adjust performance, memory usage, networking behavior, etc.

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.

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