Linux Core Concepts

Linux Boot Process (BIOS → GRUB → Kernel → init/systemd)

Boot Flow

  1. BIOS/UEFI

    • Performs POST (Power-On Self-Test)

    • Locates bootable disk

    • Loads the bootloader

  2. Bootloader (GRUB)

    • Displays OS selection menu

    • Loads the Linux kernel into memory

    • Passes boot parameters

  3. Kernel

    • Initializes hardware

    • Loads device drivers

    • Mounts root filesystem

    • Starts PID 1

  4. init / systemd

    • Starts system services

    • Brings system to a usable state


Kernel Space vs User Space

FeatureKernel SpaceUser Space
PrivilegesHighLow
Hardware AccessDirectIndirect
Stability ImpactCriticalIsolated
ExamplesKernel, driversShell, apps

Why separation?


Process vs Thread

FeatureProcessThread
MemorySeparateShared
Creation costHighLow
CommunicationIPCDirect
Crash impactIsolatedAffects whole process

Linux Filesystem Hierarchy

/bin

Essential user commands (ls, cp, cat)

/sbin

System binaries (reboot, fsck)

/etc

Configuration files

/var

Variable data (logs, cache, spool)

/usr

User programs and libraries

/home

User home directories

/proc

Virtual kernel/process info

/tmp

Temporary files


Inodes

An inode stores metadata about a file.

Stores:

Does NOT store:

Why it matters:
You can run out of inodes even if disk space is available.


Process Lifecycle

  1. Created

  2. Ready

  3. Running

  4. Waiting

  5. Terminated


Zombie and Orphan Processes

Zombie

Orphan


Linux Signals

SignalNumberPurpose
SIGKILL9Force kill
SIGTERM15Graceful stop
SIGSTOP19Pause
kill -9 <pid>
kill -15 <pid>

systemd vs init

Featureinitsystemd
Parallel startup
Dependency handling
Logging
SpeedSlowFast

journald

journald is the logging service of systemd.

Features

Commands

journalctl
journalctl -xe
journalctl -u nginx

Common Log Locations

TypeLocation
System/var/log/syslog
Auth/var/log/auth.log
Kernel/var/log/kern.log
Boot/var/log/boot.log
App logs/var/log//

Summary

This guide covers core Linux internals required for:


Want individual pages for each topic with diagrams and commands? I can auto-generate them.