Linux

16 min read3,049 words

Linux Operating System

1. What is Linux?

Linux is an open-source, Unix-like operating-system kernel. In everyday usage, “Linux” often refers to a complete operating system distribution built around the Linux kernel.

Examples:

  • Ubuntu
  • Debian
  • Fedora
  • Arch Linux
  • Kali Linux
  • Linux Mint
  • Rocky Linux
  • Red Hat Enterprise Linux

Simple definition

Linux is an open-source, Unix-like operating-system kernel that manages hardware resources and provides services for applications.

2. Linux vs Linux Distribution

This is an important distinction.

Linux Kernel

The kernel is the core component.

Linux Kernel ↓ CPU Memory Devices Processes Networking Filesystem

Linux Distribution

A distribution combines the Linux kernel with other software.

Linux Distribution │ ├── Linux Kernel ├── Shell ├── GNU utilities ├── Package manager ├── Libraries ├── Services ├── Applications └── Desktop Environment

For example:

Kali Linux ↓ Linux Kernel + Security tools + Desktop/software + Package management

3. History of Linux

Linux was created by Linus Torvalds in 1991.

The project was initially developed as a Unix-like kernel for personal computers.

Linux later became part of the broader open-source ecosystem and is now used in:

  • servers
  • desktops
  • cloud computing
  • supercomputers
  • embedded systems
  • networking devices
  • Android-based systems
  • IoT devices

4. Linux Characteristics

Important characteristics include:

Open Source

The source code of the Linux kernel is publicly available under its open-source licensing model.

Multiuser

Multiple users can use the system and have separate accounts and permissions.

Multitasking

Linux can run multiple processes concurrently.

Process A Process B Process C Process D

Portable

Linux has been ported to many hardware architectures.

Secure

Linux provides mechanisms such as:

  • users
  • groups
  • permissions
  • capabilities
  • process isolation
  • security frameworks

Stable

Linux is widely used for long-running servers and infrastructure.

Network-oriented

Networking is deeply integrated into Linux.

5. Linux Architecture

A simplified Linux architecture is:

┌─────────────────────────────┐ │ Applications │ ├─────────────────────────────┤ │ Shell / GUI / Tools │ ├─────────────────────────────┤ │ System Libraries │ ├─────────────────────────────┤ │ Linux Kernel │ │ ┌─────────────────────────┐ │ │ │ Process Management │ │ │ │ Memory Management │ │ │ │ File Systems │ │ │ │ Networking │ │ │ │ Device Drivers │ │ │ │ Security │ │ │ └─────────────────────────┘ │ ├─────────────────────────────┤ │ Hardware │ └─────────────────────────────┘

6. Linux Kernel

The kernel is the central part of Linux.

It manages:

CPU RAM Processes Filesystems Devices Networking Security

For example:

Application ↓ System Call ↓ Linux Kernel ↓ Hardware

Applications normally do not directly control hardware.

7. Major Linux Kernel Responsibilities

Process Management

The kernel:

  • creates processes
  • schedules processes
  • terminates processes
  • manages process states
  • provides inter-process communication

Memory Management

The kernel manages:

  • RAM
  • virtual memory
  • page tables
  • memory allocation
  • memory protection
  • swapping

Device Management

The kernel manages:

  • keyboards
  • disks
  • network adapters
  • USB devices
  • graphics devices
  • other hardware

through drivers and kernel subsystems.

Filesystem Management

The kernel provides access to filesystems such as:

  • ext4
  • XFS
  • Btrfs
  • tmpfs
  • others

through the Virtual File System (VFS) layer.

Networking

Linux provides:

  • TCP/IP networking
  • routing
  • sockets
  • firewall facilities
  • network interfaces

8. User Space and Kernel Space

Linux separates execution into different privilege levels.

Simplified:

┌─────────────────────────┐ │ User Space │ │ │ │ Applications │ │ Shell │ │ Utilities │ └───────────┬─────────────┘ ↓ System Calls ↓ ┌─────────────────────────┐ │ Kernel Space │ │ │ │ Kernel │ │ Drivers │ │ Memory management │ │ Process management │ │ Filesystems │ │ Networking │ └───────────┬─────────────┘ ↓ Hardware

Why?

To prevent ordinary applications from directly performing privileged operations.

9. System Calls in Linux

Applications use system calls to request kernel services.

Examples:

open() read() write() close() fork() execve() wait() mmap() socket()

Example:

Application ↓ read() ↓ Linux Kernel ↓ Device / Filesystem

10. Shell

A shell is a command interpreter that allows users to interact with the operating system.

Examples:

  • Bash
  • Zsh
  • Fish
  • Dash

For example:

ls

The shell:

User ↓ Command ↓ Shell ↓ Program / System Call ↓ Kernel

11. Bash

Bash stands for:

Bourne Again SHell

It is one of the most widely used Linux shells.

Example:

pwd ls cd Documents mkdir test

Bash can also execute scripts.

Example:

#!/bin/bash echo "Hello Linux"

12. GUI in Linux

Linux can run graphical desktop environments.

Examples:

  • GNOME
  • KDE Plasma
  • Xfce
  • Cinnamon
  • MATE
  • LXQt

Architecture concept:

User ↓ GUI/Desktop ↓ Applications ↓ Linux Kernel ↓ Hardware

13. Linux Distributions

A Linux distribution packages the kernel with user-space software.

Debian family

Debian ├── Ubuntu ├── Linux Mint └── Kali Linux

Red Hat family

Fedora ├── RHEL └── related distributions

Arch family

Arch Linux └── Arch-based distributions

There are many other distributions and families.

14. Kali Linux

Kali Linux is a Debian-based Linux distribution focused primarily on:

  • cybersecurity
  • penetration testing
  • digital forensics
  • security research
  • vulnerability assessment

It includes tools such as:

Nmap Wireshark Burp Suite Metasploit John the Ripper Hashcat

Important:

Kali Linux is not a separate kernel. It is a Linux distribution built around the Linux kernel.

15. Linux Filesystem

Linux uses a hierarchical filesystem.

The top-level directory is:

/

This is called the root directory.

Example:

/ ├── bin ├── boot ├── dev ├── etc ├── home ├── lib ├── media ├── mnt ├── opt ├── proc ├── root ├── run ├── sbin ├── tmp ├── usr └── var

16. Important Linux Directories

/

Root of the filesystem hierarchy.

/

Everything starts from here.

/home

Contains normal users' home directories.

Example:

/home/uday

/root

Home directory of the root user.

Important:

/root

is not the same as:

/

/ is the filesystem root.

/root is the root user's home directory.

/etc

Contains system-wide configuration files.

Examples:

/etc/hosts /etc/passwd /etc/fstab

/var

Contains variable data such as:

  • logs
  • caches
  • spool data
  • application data

Example:

/var/log

/tmp

Used for temporary files.

/tmp

/dev

Contains device interfaces represented as special files.

Examples:

/dev/sda /dev/nvme0n1 /dev/tty

/proc

A virtual filesystem providing information about:

  • processes
  • kernel state
  • hardware/runtime information

Example:

/proc/cpuinfo /proc/meminfo

It doesn't represent ordinary files stored permanently on disk.

/sys

A virtual filesystem exposing information about devices, drivers, and kernel objects.

/sys

/boot

Contains files needed for the boot process, such as the Linux kernel and boot-related files.

/usr

Contains much of the user-space software, libraries, documentation, and programs.

Examples:

/usr/bin /usr/lib /usr/share

17. Linux Path

Linux paths use / as the separator.

Example:

/home/uday/Documents/os.txt

Structure:

/ └── home └── uday └── Documents └── os.txt

18. Absolute Path

An absolute path starts from /.

Example:

/home/uday/Documents/file.txt

It gives the complete location.

19. Relative Path

A relative path starts from the current directory.

Suppose:

/home/uday

is the current directory.

Then:

Documents/file.txt

is a relative path.

20. Current Directory

Linux uses:

.

for the current directory.

Example:

./program

means:

Run program from the current directory.

21. Parent Directory

Linux uses:

..

for the parent directory.

Example:

cd ..

means:

Move to the parent directory.

22. Root User

The root user is the superuser with very high privileges.

Example prompt:

root@kali:~#

A normal user might see:

uday@kali:~$

Typical distinction:

$ → normal user # → commonly root shell

The prompt itself can be customized, so it should not be treated as a security proof of identity.

23. Users and Groups

Linux supports multiple users.

Each user can have:

  • username
  • user ID (UID)
  • home directory
  • group membership
  • permissions

Groups allow administrators to manage access for multiple users.

Example:

Users ├── alice ├── bob └── charlie Groups ├── developers ├── students └── administrators

24. Linux File Permissions

Linux traditionally uses:

r w x

Read

r

Write

w

Execute

x

Permissions are commonly represented for:

Owner Group Others

Example:

-rwxr-xr--

Breakdown:

- | rwx | r-x | r-- │ │ │ Owner Group Others

25. Meaning of Permissions

For a regular file:

PermissionMeaning
rRead
wModify/write
xExecute

For directories, the meanings are different:

PermissionTypical meaning
rList directory entries
wCreate/delete/rename entries, subject to other permissions
xTraverse/search the directory

26. Linux File Types

The first character of a long listing can indicate the file type.

Example:

ls -l

Output might contain:

-rw-r--r-- file.txt drwxr-xr-x Documents lrwxrwxrwx link

Meaning:

- → regular file d → directory l → symbolic link

27. Inodes

In Linux/Unix-like filesystems, an inode stores file metadata and references to the file's data blocks.

Conceptually:

Filename ↓ Directory Entry ↓ Inode ↓ Data Blocks

The inode can contain information such as:

  • permissions
  • owner
  • timestamps
  • file size
  • link count
  • block references

The filename itself is generally stored in the directory entry, not inside the inode.

28. Processes in Linux

Every running program is represented by a process.

Example:

Firefox ↓ Process

A process has a:

  • PID
  • memory space
  • registers/state
  • open files
  • credentials
  • scheduling information

29. PID

PID = Process ID

Every Linux process has a process identifier.

Example:

PID 1 PID 500 PID 1200

A common special process is PID 1, which is the initial userspace process in a normal Linux boot and commonly runs a service manager such as systemd.

30. Parent and Child Processes

Linux processes can create other processes.

Conceptually:

Parent Process │ ├── Child 1 ├── Child 2 └── Child 3

Linux traditionally uses mechanisms such as:

fork() exec() wait()

A common pattern is:

fork() ↓ Child created ↓ exec() ↓ Child runs another program

31. Linux Process States

A simplified model includes:

Running Sleeping Stopped Zombie

The exact state codes shown by tools depend on the tool and kernel representation.

32. Linux Process Management

Useful commands include:

ps top htop pgrep kill pkill

For example:

ps

shows processes.

top

shows dynamic process information.

kill PID

sends a signal to a process.

33. Signals

A signal is a software mechanism used to notify a process of an event or request it to perform an action.

Examples:

SIGTERM SIGKILL SIGINT SIGHUP

For example:

kill -TERM 1234

requests graceful termination.

kill -KILL 1234

requests immediate termination that the target process cannot catch or ignore.

34. Linux Networking

Linux has strong networking support.

It supports:

  • Ethernet
  • Wi-Fi
  • TCP/IP
  • UDP
  • DNS
  • routing
  • sockets
  • firewalls
  • VPNs

Useful commands include:

ip addr ip route ping ss

35. Linux Package Management

Linux distributions provide package managers.

Debian/Ubuntu/Kali

apt

Example:

sudo apt update sudo apt install nmap

Fedora/RHEL

Commonly:

dnf

Arch

Commonly:

pacman

Package managers handle:

  • installation
  • removal
  • updates
  • dependencies
  • package metadata

36. Linux Services

A service is a background process or system component that provides functionality.

Examples:

  • SSH server
  • web server
  • database
  • networking service

On systems using systemd, commands include:

systemctl status ssh
sudo systemctl start ssh
sudo systemctl stop ssh
sudo systemctl restart ssh

37. Linux Boot Process

A simplified Linux boot process is:

Power On ↓ Firmware BIOS/UEFI ↓ Bootloader ↓ Linux Kernel ↓ Initial userspace ↓ Init/system manager ↓ Services ↓ Login / Desktop

For many modern Linux systems:

BIOS/UEFI ↓ GRUB ↓ Linux Kernel ↓ initramfs ↓ systemd ↓ Services ↓ User

The exact process can vary by distribution and configuration.

38. Linux Security

Linux security uses several layers.

User authentication

Users authenticate before accessing accounts.

Permissions

Owner Group Others

Privilege separation

Normal users don't automatically have full system privileges.

sudo

Allows authorized users to execute selected commands with elevated privileges.

Example:

sudo apt update

Firewall

Linux systems can use firewall frameworks/tools such as:

nftables iptables ufw firewalld

depending on distribution/configuration.

Security frameworks

Linux can use mechanisms such as:

  • SELinux
  • AppArmor
  • Linux capabilities

39. Linux Advantages

1. Open source

Source code is available for inspection and modification under its licenses.

2. Security

Strong permission and privilege mechanisms.

3. Stability

Widely used for long-running services.

4. Flexibility

Can be customized extensively.

5. Performance

Can be efficient on a wide range of hardware.

6. Networking

Excellent networking capabilities.

7. Developer-friendly

Strong support for:

  • compilers
  • scripting
  • containers
  • development tools
  • servers
  • automation

8. Large ecosystem

Many distributions, tools, packages, and communities exist.

40. Linux Disadvantages

  • Can have a steeper learning curve for beginners
  • Some commercial applications may have limited native support
  • Hardware compatibility can vary
  • Different distributions have different configuration methods
  • GUI experiences differ between desktop environments

41. Linux vs Windows

FeatureLinuxWindows
Source modelOpen-source kernelProprietary OS
CustomizationVery highModerate
CLIVery powerfulPowerShell/CMD
Security modelStrong permissions + additional mechanismsStrong security architecture
ServersVery widely usedWidely used
DevelopmentExcellentExcellent
GamingImproving significantlyVery strong
DistributionsManyMain Windows editions
Package managementDistribution-dependentWinget/Microsoft Store/etc.

42. Linux vs Unix

Linux is Unix-like, but Linux is not simply the original Unix operating system.

Unix ├── Historical Unix systems │ └── Unix-like systems ├── Linux ├── BSD family └── others

Linux follows many Unix design principles.

43. Where Linux Is Used

Linux is widely used in:

Servers Cloud computing Supercomputers Cybersecurity Networking Embedded systems IoT Containers Development DevOps Android ecosystem

A large number of cloud servers and infrastructure systems run Linux.

44. Linux in IoT

Linux can run on more powerful embedded hardware such as:

  • Raspberry Pi
  • BeagleBone
  • embedded boards
  • network appliances

For very small microcontrollers such as many Arduino boards and ESP32 projects, a traditional Linux OS is generally not used; they typically run firmware directly or use a real-time operating system/framework.

Example:

Raspberry Pi ↓ Linux ↓ Python / C / Node.js ↓ GPIO ↓ Sensors

Whereas:

ESP32 ↓ Firmware / RTOS ↓ GPIO ↓ Sensor

45. Linux Architecture in One Diagram

┌──────────────────────────────────────┐ │ USER SPACE │ │ │ │ Applications │ │ Shell │ │ GUI │ │ Utilities │ │ Libraries │ └──────────────────┬───────────────────┘ │ System Calls │ ┌──────────────────▼───────────────────┐ │ KERNEL SPACE │ │ │ │ Process Management │ │ Memory Management │ │ File Systems / VFS │ │ Networking │ │ Device Drivers │ │ Security │ │ IPC │ └──────────────────┬───────────────────┘ │ ┌──────────────────▼───────────────────┐ │ HARDWARE │ │ │ │ CPU │ RAM │ SSD │ Network │ Devices │ └──────────────────────────────────────┘

46. Linux Important Terms

TermMeaning
KernelCore of the OS
DistributionKernel + user-space software
ShellCommand interpreter
BashPopular Linux shell
RootFilesystem root / OR superuser depending on context
/homeNormal users' home directories
/etcSystem configuration
/varVariable system data
/devDevice interfaces
/procProcess/kernel information
/sysKernel/device information
PIDProcess ID
DriverSoftware interface to hardware
InodeFile metadata structure
sudoRun authorized commands with elevated privileges
Package managerInstalls/updates software

47. Linux Boot Flow — Exam Version

Power ON ↓ BIOS/UEFI ↓ Bootloader ↓ Linux Kernel ↓ initramfs / Initial userspace ↓ system manager (commonly systemd) ↓ Services ↓ Login ↓ Shell / GUI

🧠 Exam Revision

Definition

Linux is an open-source, Unix-like operating-system kernel that manages CPU, memory, processes, filesystems, devices, networking, and other system resources.

Five major Linux components to remember

Kernel Shell Filesystem Utilities Applications

Most important architecture

Application ↓ Shell / Libraries ↓ System Calls ↓ Linux Kernel ↓ Hardware

Important directories

/ → Root /home → User home directories /root → Root user's home /etc → Configuration /var → Variable data/logs /tmp → Temporary files /dev → Device interfaces /proc → Process/kernel information /sys → Device/kernel information /boot → Boot-related files /usr → User-space programs/libraries/data

🧠 Memory trick

Linux = Kernel + Shell + Filesystem + Tools + Applications

And for the filesystem:

/ = Everything starts here

/home = Users

/etc = Configuration

/var = Changing data

/dev = Devices

/proc = Processes

/sys = System/device information

Keep learning. Keep building. Keep growing.

© 2026 Ugenz Academy