What is Linux?

Linux is an open-source operating system built around a core component called the kernel. It acts as a bridge between the user, software applications, and computer hardware.

Core Architecture

1. Kernel

The heart of Linux. Manages CPU, Memory, Devices, File Systems. Works behind the scenes.

2. User Space

Where programs run: Terminal, File Manager, Browser, Editors.

3. Distributions

Kernel + Tools + Desktop. Examples: Ubuntu, Kali, Red Hat.

The Terminal & Shell

What is Terminal?

A text-based interface to communicate with the OS. Instead of clicking icons, you type instructions.

user@system:~$ whoami
  • Faster and precise.
  • Deeper system control.

What is a Shell?

The command interpreter (e.g., Bash). It reads commands, executes them, and displays output.

Flow: User types → Shell interprets → Kernel executes → Output displayed.

Linux File System

Linux uses a single tree structure starting from root /.

/
├── home (User files)
├── bin (Essential commands)
├── etc (Configuration files)
├── var (Logs and data)
└── tmp (Temporary files)

Command Categories

Navigation Commands

user@system:~$ pwd    # Print Working Directory
user@system:~$ ls     # List files
user@system:~$ cd Docs # Change Directory

File Management

user@system:~$ mkdir NewFolder # Make Directory
user@system:~$ touch file.txt  # Create empty file
user@system:~$ cp file.txt file2.txt # Copy
user@system:~$ rm file.txt    # Remove (Delete)

System Info

user@system:~$ uname -a   # Kernel info
user@system:~$ top        # Process monitor
user@system:~$ df -h      # Disk space

🧪 Hands-On Tasks

Execute these tasks step-by-step in your terminal.

pwd
ls
cd Documents
cd ..
clear
mkdir Workshop
cd Workshop
touch file1.txt file2.txt file3.txt
ls
cp file1.txt backup.txt
mv file2.txt renamed.txt
ls -l