Skip to content

Introduction to Linux Operating System

Mahesh Shukla edited this page Sep 2, 2025 · 2 revisions

🐧 Linux OS Distributions

Kali Linux

Kali Linux is a specialized Linux distribution primarily developed as a replacement for Backtrack. It is designed for penetration testing and security auditing. Known for its comprehensive suite of tools that facilitate successful testing tasks.

Backtrack

Backtrack was the precursor to Kali Linux, providing a wide range of tools for penetration testing and advanced security methodologies.

Knoppix Linux

Knoppix is a Debian-based OS, designed to run from CD/DVD or USB. Portable, flexible, ideal for testing and system recovery.

Debian

Debian is an open-source OS with the Linux kernel. Known for stability, security, and adherence to free software principles. Many Linux distributions, including Kali, are based on Debian.

Evolution to Kali Linux

Kali Linux evolved from Backtrack with advancements in security tools, usability, and stability.

Development and Release

Kali Linux 1.0 released in 2013, providing advanced tools for security professionals.

Creators

Developed by Mati Aharoni and Devon Kearns of Offensive Security.


🧩 Kernel and Architecture

The kernel is the core program of an OS, managing hardware and software resources.

It decides which running programs get CPU, RAM, and access to peripherals like keyboards, printers, and monitors.

Types of Kernel

1️⃣ Monolithic Kernel

Monolithic-Architecture

2️⃣ Micro Kernel

Microkernel

3️⃣ Hybrid Kernel

Hybrid-Kernel-Architecture-23


💻 Linux Fundamentals

Kernel

Controls system resources and manages interactions between hardware and software.

RAM

Temporary storage for programs and data. Kernel allocates memory to processes.

Shell

Interface to interact with Linux through commands.

Types of Shells

  • Bash: Most common, default shell ($ prompt)
  • Bourne Shell: Original Unix shell (/bin/sh)
  • Csh: C-like syntax (% prompt)

📂 Linux File System Hierarchy (FHS)

Defines directory structure and file placement.

Key Directories

Directory Purpose
/bin Essential commands
/boot Boot files
/dev Device files
/etc Configurations
/home User directories
/lib Shared libraries
/media Mount removable media
/mnt Temporary mount points
/opt Optional software
/root Root user's home
/sbin System admin utilities
/srv Service-specific data
/tmp Temporary files
/usr Read-only shared data
/var Variable data, logs
/proc Running process info
/lost+found Recovered file fragments
/run Temporary process storage

📄 Linux File Types

Type Description
- Regular file
d Directory
c Character device file
b Block device file
s Local socket file
p Named pipe (FIFO)
l Symbolic link

Examples

  • Regular files: touch file.txt
  • Directory: mkdir folder
  • Local Socket: /var/run/apache2.sock
  • Named Pipe: mkfifo mypipe
  • Symbolic Link: ln -s target linkname

⚙️ Control Operators

Operator Function
; Execute sequential commands
& Background execution
&& Execute next only if previous succeeds
# Comment

📤 I/O Redirection & Pipes

# Append to a file
echo "Hello World" >> file.txt

# Pipe example
cat file.txt | grep "Hello"