Linux Tips For Normal Users
By Gurjot Singh Saini | 07 Aug 2022 | (0 Reviews)
Suggest Improvement on Linux Tips For Normal Users — Click here
Linux Basics & Daily Usage – Beginner Friendly
This module builds a strong foundation for first-time Linux users. You will understand what Linux is, how it differs from Windows/macOS, and how to use Linux comfortably in daily life.
1.1 What Is Linux? History, Philosophy & Use Cases
Linux is a free and open-source operating system built around the Linux kernel.
Unlike Windows, Linux is community-driven, highly customizable, and used everywhere — from laptops and servers to Android phones and supercomputers.
1.2 Linux vs Windows vs macOS (Real Differences)
| Feature | Linux | Windows | macOS |
|---|---|---|---|
| Cost | Free | Paid | Included with Apple devices |
| Customization | Very High | Limited | Moderate |
| Security | Very Strong | Target of most malware | Strong |
1.3 Linux Distributions Explained (Ubuntu, Fedora, Mint)
- Ubuntu: Beginner-friendly, large community
- Linux Mint: Windows-like feel
- Fedora: Modern and developer-focused
1.4 Desktop Environment vs Window Manager
A Desktop Environment provides a complete visual experience (menus, settings, file manager), while a Window Manager only controls window behavior.
1.5 Linux File System Basics (/home, /etc, /var)
- /home – Your personal files
- /etc – System configuration
- /var – Logs and system data
1.6 User Files, Hidden Files & Configuration Files
Files starting with a dot (.config, .bashrc)
are hidden files used for settings.
1.7 Everyday Linux Usage for Normal Users
- Web browsing & media
- Office work
- Software installation via app store
- Updates without restarting constantly
Installing Linux – Complete Beginner's Guide to Safe Installation
This module provides comprehensive, step-by-step guidance for installing Linux safely and confidently. Whether you're completely new to Linux or have tried installations before, this module covers every detail from preparation to post-installation setup.
2.1 Dual Boot vs Full Linux Installation – Pros, Cons & Decision Guide
🖥️ Full Linux Installation (Linux Only)
A full installation means Linux is the only operating system on your computer. The entire hard drive is dedicated to Linux.
✅ Advantages:
- Maximum Performance: Linux has full access to all hardware resources without sharing with another OS
- Simpler Setup: No complex partition management or bootloader configuration
- No Disk Space Wasted: All disk space is available for Linux files and applications
- Better for Learning: Forces you to fully commit and learn the system
- No Boot Conflicts: Windows updates won't break your Linux bootloader
- Ideal for Old Computers: Breathe new life into aging hardware
❌ Disadvantages:
- No Windows Access: You cannot run Windows applications natively (though Wine/VMs are alternatives)
- Irreversible Commitment: Requires backing up and wiping all existing data
- Learning Curve: Must adapt to Linux for all computing tasks
- Software Compatibility: Some Windows-only software may not have Linux alternatives
🔄 Dual Boot Installation (Linux + Windows)
Dual booting means installing Linux alongside Windows on the same computer. When you start your computer, you choose which operating system to use.
✅ Advantages:
- Best of Both Worlds: Use Windows for gaming/essential software and Linux for learning/development
- Safety Net: You always have a working Windows system to fall back on
- Gradual Transition: Learn Linux at your own pace while keeping Windows familiar
- Hardware Compatibility: Can test Linux hardware support while keeping Windows as backup
- File Sharing: Access the same files from both operating systems (with proper partition setup)
❌ Disadvantages:
- Disk Space Sharing: Must divide your hard drive between both systems
- Bootloader Complexity: Windows updates can sometimes overwrite the Linux bootloader
- Time Zone Issues: Windows and Linux handle hardware clock differently (can be fixed)
- Reboot Required: Cannot run both operating systems simultaneously
- Partition Risks: Resizing Windows partitions carries a small risk of data loss
💻 Alternative: Virtual Machine Installation
For complete beginners, virtual machines offer the safest way to try Linux.
How It Works:
Software like VirtualBox or VMware creates a "virtual computer" inside Windows. Linux runs in a window, sharing resources with your main OS.
✅ Advantages:
- 100% Safe: Cannot damage your Windows installation
- No Partitioning: Linux lives in a file, not on disk partitions
- Simultaneous Use: Run Linux and Windows side by side
- Snapshots: Save system state and roll back if something breaks
- Easy Removal: Just delete the virtual machine files
❌ Disadvantages:
- Performance Overhead: Linux runs slower than on real hardware
- Limited Hardware Access: Graphics acceleration, USB devices may have limitations
- Not Suitable for Production: Not ideal for long-term daily use
📊 Comparison Table: Installation Methods
| Feature | Full Installation | Dual Boot | Virtual Machine |
|---|---|---|---|
| Safety | Medium (wipes disk) | Medium (partition risk) | Very High |
| Performance | Native (100%) | Native (100%) | 70-90% of native |
| Disk Space Needed | 20GB+ | Windows + 20GB+ | 20GB+ file |
| Hardware Access | Full | Full | Limited |
| Learning Curve | Steep | Moderate | Gentle |
| Recommended For | Spare PC, committed users | Daily drivers, gamers | Beginners, testing |
🔍 Decision Tree: Which Method Should You Choose?
- Do you have a spare computer? → Try Full Installation on the spare machine
- Need Windows for specific software/games? → Choose Dual Boot
- Just want to try Linux safely? → Start with Virtual Machine
- Have limited disk space? → Consider Virtual Machine or Full Installation on separate drive
- Worried about breaking your computer? → Definitely start with Virtual Machine
💡 Pro Tip: Many users start with a virtual machine, progress to dual boot, and eventually switch to full Linux installation as they become comfortable.
2.2 UEFI, Legacy Boot & Secure Boot – Modern PC Boot Systems Explained
🔄 BIOS vs UEFI: The Fundamental Difference
📟 Legacy BIOS (Basic Input/Output System)
- Age: Developed in 1980s, used until ~2010
- Partition Scheme: Uses MBR (Master Boot Record)
- Disk Limit: Cannot boot from disks larger than 2TB
- Partition Limit: Maximum 4 primary partitions
- Boot Process: Simple, loads first sector of disk
- Interface: Text-based, keyboard-only navigation
- Speed: Slower boot times
💻 UEFI (Unified Extensible Firmware Interface)
- Age: Standard since ~2010, all modern PCs
- Partition Scheme: Uses GPT (GUID Partition Table)
- Disk Limit: Supports disks up to 9.4 zettabytes
- Partition Limit: Up to 128 primary partitions
- Boot Process: More complex, reads from EFI System Partition
- Interface: Graphical, supports mouse, faster navigation
- Speed: Faster boot times, optimized startup
Windows: Press Win + R, type
msinfo32, look for "BIOS Mode"Linux: Run
ls /sys/firmware/efi – if directory exists, you're using UEFI
🔒 Secure Boot: What It Is and Why It Matters
Secure Boot is a UEFI feature that prevents unauthorized operating systems and malware from loading during startup. It checks that every piece of boot software is digitally signed by trusted keys.
How Secure Boot Affects Linux:
- Ubuntu and Fedora: Fully support Secure Boot (their bootloaders are signed by Microsoft)
- Some Distributions: May not have signed bootloaders (Debian, Arch, many others)
- Dual Boot Impact: Can prevent Linux from booting if not properly configured
- NVIDIA Drivers: Proprietary drivers may not load with Secure Boot enabled
Your Options:
| Option | Procedure | Security Impact |
|---|---|---|
| Disable Secure Boot | Enter BIOS/UEFI settings, find Secure Boot option, disable it | Reduces boot-time security, but fine for most home users |
| Use Signed Distributions | Install Ubuntu, Fedora, or other signed distros | Maintains full security with working Linux |
| Enroll Custom Keys | Advanced: Generate and enroll your own MOK (Machine Owner Key) | Highest security, complex setup |
⚙️ Accessing BIOS/UEFI Settings – Step-by-Step Guide
Method 1: Using Boot Key During Startup
Immediately after turning on your computer, press the appropriate key repeatedly:
| Manufacturer | Common Key(s) |
|---|---|
| Dell | F2, F12 |
| HP | Esc, F10, F12 |
| Lenovo | F1, F2, F12 (ThinkPad: Enter then F1) |
| Acer | F2, Del, F12 |
| Asus | F2, Del, Esc |
| Toshiba | F2, F12 |
| Sony | F2, F3, F12 |
| Microsoft Surface | Volume Up + Power |
Method 2: From Windows 10/11
- Open Settings → Update & Security → Recovery
- Under "Advanced startup," click Restart now
- Choose Troubleshoot → Advanced options → UEFI Firmware Settings
- Click Restart
Important Settings to Check Before Linux Installation:
- Boot Mode: Should be set to match your installation media (UEFI or Legacy)
- Secure Boot: Enable/disable based on your distribution choice
- Fast Boot: Disable this – can prevent USB booting
- SATA Mode: Should be AHCI, not RAID or Intel RST (common issue!)
- Boot Order: Ensure USB/DVD is prioritized over hard drive
🧩 Common BIOS/UEFI Terms Explained
- CSM (Compatibility Support Module)
- Enables UEFI to boot legacy BIOS operating systems. Enable this if you're mixing old and new.
- Fast Boot
- Skips some hardware checks to speed up startup. Disable for Linux installation.
- PXE Boot
- Network booting – can be disabled to speed up boot if not needed.
- TPM (Trusted Platform Module)
- Security chip used by Windows 11. Linux supports it, but may require configuration.
- VT-x/AMD-V
- Hardware virtualization support. Enable this if you plan to use virtual machines.
✅ Quick Checklist Before Installation:
- ☐ Know your boot mode: UEFI or Legacy BIOS
- ☐ Secure Boot setting matches your distribution
- ☐ SATA mode is AHCI (not RAID/RST)
- ☐ Fast Boot is disabled
- ☐ Boot order prioritizes USB/DVD
- ☐ You have backed up important data
2.3 Creating Bootable USB – Complete Guide with Rufus & BalenaEtcher
📦 What You'll Need
- USB Drive: Minimum 4GB (8GB recommended for most distributions)
- Linux ISO File: Downloaded from official distribution website
- Bootable USB Creation Tool: Rufus (Windows), BalenaEtcher (All platforms), or dd (Linux)
- Working Computer: To create the bootable USB
🔧 Method 1: Rufus (Windows – Recommended)
Rufus is the fastest and most reliable tool for Windows users.
Step-by-Step Instructions:
- Download Rufus from rufus.ie (portable version recommended – no installation needed)
- Insert your USB drive (ensure it's empty or backed up)
- Open Rufus (it will automatically detect your USB)
- Configure Rufus:
- Device: Select your USB drive (double-check you have the right one!)
- Boot selection: Click "SELECT" and choose your Linux ISO file
- Partition scheme:
- For UEFI systems: Choose GPT
- For Legacy BIOS: Choose MBR
- If unsure, choose MBR (works in most cases)
- File system: Leave as default (FAT32)
- Cluster size: Leave as default
- Click "START"
- Important Dialog Boxes:
- If asked about "ISOHybrid image" – select "Write in ISO Image mode" (recommended)
- If warned about formatting – confirm by clicking OK
- Wait for completion (status bar at bottom shows progress)
- Click "CLOSE" when finished – your bootable USB is ready!
- Rufus shows a green "READY" when complete
- Use the portable version – no installation required
- Rufus is much faster than other tools for large ISOs
- It automatically handles ISOs larger than 4GB (FAT32 limitation)
🎨 Method 2: BalenaEtcher (All Platforms – Beginner Friendly)
BalenaEtcher works on Windows, macOS, and Linux with a beautiful, simple interface.
Step-by-Step Instructions:
- Download BalenaEtcher from balena.io/etcher
- Install and open Etcher
- Click "Flash from file" and select your Linux ISO
- Click "Select target" and choose your USB drive
- Click "Flash!" to start the process
- Enter administrator password if prompted (on Linux/macOS)
- Wait for validation (Etcher automatically verifies the write)
- Click "Flash another" or close the app when done
- Beautiful, intuitive interface
- Same experience on all platforms
- Automatic validation after writing
- Harder to accidentally select wrong drive
- Slower than Rufus on Windows
- No advanced options like persistent storage
- Cannot write to internal drives (safety feature)
🐧 Method 3: Using dd Command (Linux – Advanced)
For Linux users comfortable with terminal, the dd command is the most direct method.
# First, identify your USB drive (be VERY careful!)lsblk# Look for your USB drive – usually /dev/sdb or /dev/sdc# Unmount any mounted partitionssudo umount /dev/sdb*# Write the ISO to USB (replace /dev/sdb with your device!)sudo dd if=/path/to/linux.iso of=/dev/sdb bs=4M status=progress oflag=sync# Wait for completion (no progress bar unless status=progress is supported)# Sync to ensure all data is writtensync
/dev/sdX is truly your USB drive, not your system disk.
How to Identify the Correct USB Device:
- Run
lsblkbefore and after inserting USB – the new device is your USB - Check size – a 8GB USB will show as 7.5GB in lsblk
- Look for device without partitions (
/dev/sdbnot/dev/sdb1)
🔍 Troubleshooting Bootable USB Issues
Problem: USB Doesn't Boot
- Secure Boot enabled? Try disabling or using a signed distribution
- Wrong boot mode? Ensure USB was created for correct mode (UEFI vs Legacy)
- Fast Boot enabled? Disable in BIOS
- USB 3.0 issues? Try a USB 2.0 port
- Corrupted ISO? Verify ISO checksum (see below)
Problem: "Failed to load COM32" or Similar Errors
- Usually caused by using wrong partition scheme – recreate USB with correct scheme
- Try a different USB creation tool
Problem: USB Works on Some Computers but Not Others
- Different computers have different BIOS/UEFI implementations
- Create USB with "compatibility" mode if available
✅ Verifying Your ISO – Checksums Explained
Before creating your bootable USB, you should verify the ISO integrity to ensure it downloaded correctly and hasn't been tampered with.
What is a Checksum?
A checksum is like a digital fingerprint of a file. The official website provides MD5, SHA-1, or SHA-256 hashes. After downloading, you generate the same hash and compare.
How to Verify:
On Windows (PowerShell):
Get-FileHash .\linux.iso -Algorithm SHA256
On Linux/macOS:
sha256sum linux.iso
Compare the output with the hash on the official download page. They must match exactly.
2.4 Disk Partitioning Explained for Beginners – No Jargon, Just Understanding
🧩 What Are Partitions? The Room Analogy
Imagine your hard drive is a large empty warehouse:
- Unpartitioned Drive: One huge open space – chaotic and hard to organize
- Partitions: Building walls to create separate rooms – office, storage, workshop
- Filesystems: How each room is organized – shelving, filing cabinets, workbenches
- Mount Points: Doors with signs – "/" for the main room, "/home" for personal stuff
In Linux, everything is a file, and partitions are attached (mounted) to directories. The root partition (/) is like your main living area – essential for the system to function.
📊 Partition Table Types: MBR vs GPT
Before creating partitions, you need a partition table – a map of how the disk is divided.
MBR (Master Boot Record) – Legacy
- Used with: Legacy BIOS systems
- Maximum disk size: 2TB
- Maximum partitions: 4 primary, or 3 primary + extended logical
- Age: Since 1983, still common
- Bootloader location: First sector of disk
GPT (GUID Partition Table) – Modern
- Used with: UEFI systems
- Maximum disk size: 9.4 zettabytes (effectively unlimited)
- Maximum partitions: 128 (Windows limit, theoretically more)
- Redundancy: Stores backup partition table at end of disk
- Bootloader location: Special EFI System Partition (ESP)
- UEFI system → GPT
- Legacy BIOS → MBR
- Disk > 2TB → GPT required
- Dual boot with Windows 10/11 → GPT
📁 Essential Linux Partitions Explained
Linux can run on a single partition, but multiple partitions offer benefits:
/ (root) – Essential
The root of the filesystem tree. Contains all system files, programs, and configurations. Minimum 10-15GB, recommended 20-30GB for comfortable use.
/home – User Data (Optional but Recommended)
Contains personal files: documents, downloads, music, configuration files. Separating /home allows you to reinstall Linux without losing personal data. Size depends on your needs – allocate remaining space.
swap – Virtual Memory (Optional but Recommended)
Acts as overflow RAM and supports hibernation. Not a traditional filesystem. Size rule: If RAM ≤ 2GB, swap = 2× RAM; RAM 2-8GB, swap = RAM; RAM > 8GB, swap = 4-8GB or as needed for hibernation.
/boot – Boot Files (Special Case)
Contains kernel and bootloader. Usually 500MB-1GB. Only needed for special setups (encryption, RAID).
EFI System Partition (ESP) – UEFI Only
For UEFI systems. Contains bootloaders. Usually 100-500MB, FAT32 format.
⚙️ Partitioning Scenarios – Real Examples
Scenario 1: Simple Single Partition (Beginners, 120GB SSD)
/dev/sda1: / (root) - 120GB, ext4 (swap file instead of partition – modern approach)
Pros: Simplest, no space wasted. Cons: Reinstalling loses all data.
Scenario 2: Root + Home Separation (Recommended, 500GB HDD)
/dev/sda1: / (root) - 50GB, ext4 /dev/sda2: /home - 430GB, ext4 /dev/sda3: swap - 8GB (if RAM = 8GB)
Pros: Safe reinstalls, organized. Cons: Slightly more complex.
Scenario 3: Dual Boot with Windows (250GB SSD)
/dev/sda1: Windows C: - 100GB, NTFS /dev/sda2: / (root) - 50GB, ext4 /dev/sda3: /home - 80GB, ext4 /dev/sda4: Shared Data - 20GB, NTFS (for files both OS need)
Scenario 4: Advanced Multi-Partition (Server/Enthusiast)
/dev/sda1: /boot - 1GB, ext2 /dev/sda2: / (root) - 30GB, ext4 /dev/sda3: /home - 200GB, ext4 /dev/sda4: /var - 20GB, ext4 (separate logs) /dev/sda5: /tmp - 5GB, ext4 (separate temp files) /dev/sda6: swap - 8GB
🔧 Step-by-Step: Partitioning During Ubuntu Installation
Here's what you'll actually see during installation:
Option 1: "Erase disk and install Ubuntu" (Automatic)
- Simplest option – wipes entire disk, creates single partition
- Good for: Full installation, beginners, virtual machines
- Warning: All existing data on the disk will be lost!
Option 2: "Install Ubuntu alongside Windows" (Automatic Dual Boot)
- Installer automatically shrinks Windows partition and creates space for Linux
- Good for: Simple dual boot without manual partitioning
- Limitation: Less control over partition sizes
Option 3: "Something else" (Manual Partitioning)
Choose this for full control. Here's what to do:
- Select free space and click + to add partition
- Create root partition:
- Size: 20000-30000 MB (20-30GB)
- Type: Primary
- Location: Beginning
- Use as: Ext4 journaling file system
- Mount point: /
- Create home partition (optional):
- Size: Remaining space (or desired size)
- Use as: Ext4
- Mount point: /home
- Create swap area (optional):
- Size: Equal to RAM (for hibernation) or 4-8GB
- Use as: swap area
- For UEFI systems: Ensure an EFI System Partition exists (usually created by Windows)
- Click Install Now and confirm changes
🔍 Common Partitioning Mistakes and How to Avoid Them
| Mistake | Consequence | How to Avoid |
|---|---|---|
| Installing to wrong disk | Data loss on wrong drive | Use lsblk to identify disks; check sizes carefully |
| No swap space with low RAM | System may freeze under memory pressure | Always create swap if RAM < 4GB, or use swap file later |
| Root partition too small | Cannot install updates or software | Give root at least 20GB, 30GB recommended |
| Forgetting EFI partition | UEFI system won't boot | Ensure ESP exists and is mounted at /boot/efi |
| Incorrect filesystem type | Partition not recognized | Use ext4 for Linux partitions, FAT32 for EFI |
💡 Pro Tips:
- Take screenshots of your partition layout before making changes
- Write down which partitions are which
- Use GParted live CD if you want to partition before installation
- LVM and encryption are advanced topics – stick to basic partitions as a beginner
2.5 Swap Partition vs Swap File – Memory Management Explained
💾 Swap Partition – The Traditional Approach
A swap partition is a dedicated partition on your hard drive formatted as swap space (not a filesystem like ext4).
✅ Advantages:
- Performance: Slightly faster than swap file (contiguous on disk)
- Reliability: Less fragmentation, stable performance
- Hibernation: Required for hibernation (suspend-to-disk)
- Simplicity: Set once, forget forever
- Isolation: Can't be accidentally overwritten by user files
❌ Disadvantages:
- Inflexible: Can't resize without repartitioning
- Space Waste: If you don't need swap, that space is unusable
- Complex Setup: Requires partitioning during installation
- Wasted if unused: If you rarely use swap, partition sits idle
📄 Swap File – The Modern Flexible Alternative
A swap file is a regular file within your root or home partition that Linux uses as swap space.
✅ Advantages:
- Flexible: Easily resize, add, or remove without repartitioning
- Simple Setup: Create with a few commands after installation
- No Partitioning: Simplifies disk layout, especially for beginners
- Space Efficient: File only uses space when actually needed
- Multiple Swap Files: Can have several for different purposes
❌ Disadvantages:
- Slightly Slower: May have minor performance overhead
- Fragmentation: Can become fragmented over time
- Hibernation Issues: Some setups require special configuration for hibernation with swap file
- Root Filesystem Dependency: If root fills up, swap may be affected
⚖️ How Much Swap Do You Need? The Complete Guide
The "traditional" rule (swap = 2× RAM) is outdated. Modern systems with plenty of RAM rarely use swap.
| RAM Size | Swap Size (No Hibernation) | Swap Size (With Hibernation) | Recommendation |
|---|---|---|---|
| ≤ 2GB | 2× RAM | 3× RAM | Essential – create swap partition |
| 2GB – 4GB | Equal to RAM | 2× RAM | Recommended – swap file is fine |
| 4GB – 8GB | 4GB – 8GB | Equal to RAM | Optional – swap file for safety |
| 8GB – 16GB | 4GB | 8GB – 16GB | Minimal – swap file if needed |
| 16GB – 32GB | 2GB – 4GB | 16GB – 32GB | Almost never needed without hibernation |
| > 32GB | 0-2GB | Equal to RAM | Only for hibernation |
🔧 How to Create a Swap File After Installation
If you didn't create swap during installation, you can easily add a swap file:
# Create a swap file (4GB in this example)sudo fallocate -l 4G /swapfile# OR using dd: sudo dd if=/dev/zero of=/swapfile bs=1M count=4096# Set correct permissions (root only)sudo chmod 600 /swapfile# Format as swapsudo mkswap /swapfile# Enable the swap filesudo swapon /swapfile# Verify it's workingsudo swapon --showfree -h# Make permanent (add to /etc/fstab)echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
To Disable and Remove Swap File:
sudo swapoff /swapfilesudo rm /swapfile# Then remove the line from /etc/fstab
💤 Hibernation (Suspend-to-Disk) Explained
Hibernation saves the contents of RAM to swap and powers off completely. When you turn on your computer, everything is restored exactly as you left it.
Requirements for Hibernation:
- Swap size must be at least equal to RAM (slightly larger recommended)
- Swap must be a partition (swap file hibernation is possible but more complex)
- Kernel parameter:
resume=UUID=swap-partition-uuidmust be added - Initramfs: Must include the
resumehook
Check if Hibernation is Available:
sudo systemctl hibernate # Test hibernationcat /sys/power/state # Look for 'disk' in output
🎯 Recommendation Summary:
- For beginners: Let the installer create swap automatically (usually a swap file in modern distros)
- For dual boot with Windows: Use swap file to avoid partition complexity
- If you need hibernation: Create a swap partition equal to your RAM size
- If you have limited disk space: Use swap file and set swappiness lower (see below)
2.6 Common Installation Errors & Fixes – Complete Troubleshooting Guide
Symptoms: Installer won't proceed, shows this error message.
Cause: You haven't assigned the root mount point (/) to any partition.
Solution:
- In the partitioning screen, select the partition you want as root
- Click Change or double-click the partition
- Set "Use as:" to Ext4 (or your preferred filesystem)
- Set "Mount point:" to /
- Click OK and continue
/ to your main Linux partition.
Symptoms: Installation completes but fails at the end with GRUB error.
Causes:
- UEFI vs Legacy mismatch
- Secure Boot blocking GRUB
- EFI partition missing or wrong format
- Multiple disks causing confusion
Solutions:
Fix 1: Check Boot Mode
- Ensure your USB boots in the same mode as your target installation (UEFI or Legacy)
- In BIOS, disable CSM/Legacy boot for UEFI installation
Fix 2: Secure Boot
- Temporarily disable Secure Boot in BIOS
- Install with Secure Boot disabled, then re-enable and enroll MOK if needed
Fix 3: Manual GRUB Installation
# Boot from live USB, chroot into installed systemsudo mount /dev/sdaX /mnt # Your root partitionsudo mount /dev/sdaY /mnt/boot/efi # EFI partition if UEFIsudo mount --bind /dev /mnt/devsudo mount --bind /proc /mnt/procsudo mount --bind /sys /mnt/syssudo chroot /mntgrub-install /dev/sdaupdate-grubexit
Symptoms: No wireless networks visible, Wi-Fi option missing.
Causes:
- Missing proprietary drivers (common with Broadcom, Realtek chips)
- Hardware switch turned off
- Kernel too old for very new hardware
Solutions:
Immediate Fix (during installation):
- Use Ethernet cable temporarily
- Use phone USB tethering (Android: USB tethering, iPhone: Personal Hotspot via USB)
After Installation (with internet):
# Ubuntu/Debian - Install additional driverssudo ubuntu-drivers autoinstall# Or use Additional Drivers GUI tool# For Broadcom specifically:sudo apt install bcmwl-kernel-source# For Realtek:sudo apt install rtl8821ce-dkms # (example, depends on chip)
Check Hardware Switch:
- Some laptops have physical Wi-Fi switch or Fn key combination
- Run
rfkill listto see if soft/hard blocked rfkill unblock wifito unblock software block
Symptoms: Installer shows no hard drives, or cannot find disks to install to.
Causes:
- SATA mode set to RAID/Intel RST instead of AHCI
- NVMe drive not supported by kernel
- Faulty SATA cable or connection
- Drive not properly connected or powered
Solutions:
Fix 1: Change SATA Mode to AHCI (Most Common)
- Restart and enter BIOS/UEFI
- Find SATA Operation, SATA Mode, or similar setting
- Change from Intel RST Premium with Optane or RAID to AHCI
- Save and exit
Fix 2: Check Disk Recognition in Terminal
# From live USB terminal:lsblk # List all block devicessudo fdisk -l # Detailed partition infolspci | grep -i sata # Check SATA controller
Fix 3: Load Additional Drivers
Some NVMe drives need extra drivers. Try booting with different kernel parameters:
- At GRUB menu, press e to edit boot parameters
- Add
pci=reallocornvme_core.default_ps_max_latency_us=0 - Press Ctrl+X or F10 to boot
Symptoms: Screen goes black, freezes, or shows garbled graphics after booting from USB.
Causes:
- NVIDIA graphics card incompatibility
- Nomodeset parameter needed
- Resolution too high for display
- Wayland vs Xorg session issues
Solutions:
Fix 1: Use nomodeset Kernel Parameter
- At GRUB menu, highlight "Try Ubuntu" or "Install Ubuntu"
- Press e to edit
- Find the line ending with
quiet splashor--- - Add
nomodesetbefore the---or afterquiet splash - Press Ctrl+X or F10 to boot
Other useful parameters:
nouveau.modeset=0– Disable open-source NVIDIA driverradeon.modeset=0– For AMD graphicsi915.modeset=0– For Intel graphicsnoacpi– Disable ACPI (if power management causes issues)nolapic– Disable local APIC
Fix 2: Choose Safe Graphics Mode
Some installers (like Ubuntu) have a "Safe Graphics" option in the GRUB menu – choose this for automatic nomodeset.
Fix 3: Try Different Display Server
At the login screen, click the gear icon and choose "Ubuntu on Xorg" instead of "Ubuntu" (Wayland).
Symptoms: Progress bar stops at a specific percentage, often during package installation or language pack download.
Causes:
- Network timeout downloading updates
- Corrupted ISO or USB
- Insufficient disk space
- Hardware compatibility issue
Solutions:
Fix 1: Install Without Updates
- During installation, uncheck "Download updates while installing"
- Also uncheck "Install third-party software" (can add later)
- Continue installation
Fix 2: Check USB Integrity
- Verify ISO checksum
- Recreate bootable USB with different tool
- Try different USB port (USB 2.0 preferred)
Fix 3: Check Disk Space
Ensure you've allocated enough space for root partition (at least 15-20GB).
Fix 4: Disable Quiet Splash to See Errors
Remove quiet splash from boot parameters to see where it actually hangs.
Symptoms: After dual boot installation, GRUB only shows Linux, no Windows option.
Causes:
- OS-prober not running or disabled
- Windows installed in different boot mode (UEFI vs Legacy)
- Windows partition damaged
Solutions:
Fix 1: Update GRUB
sudo update-grub# Or on some systems:sudo grub-mkconfig -o /boot/grub/grub.cfg
Fix 2: Enable OS Prober (Ubuntu 22.04+)
Newer versions disable OS prober by default. Enable it:
sudo nano /etc/default/grub# Add this line:GRUB_DISABLE_OS_PROBER=false# Save, then:sudo update-grub
Fix 3: Manually Add Windows Entry
If Windows still doesn't appear, you can manually add it:
sudo nano /etc/grub.d/40_custom# Add:menuentry "Windows 10" { insmod part_gpt insmod ntfs set root='(hd0,gpt1)' # Adjust to your Windows partition chainloader /EFI/Microsoft/Boot/bootmgfw.efi}sudo update-grub
Symptoms: After dual boot, time is wrong in one OS (usually Windows shows wrong time).
Cause: Windows assumes hardware clock is local time; Linux assumes UTC.
Solutions:
Fix 1: Make Linux Use Local Time (Recommended)
timedatectl set-local-rtc 1 --adjust-system-clock# Verify:timedatectl | grep local
This tells Linux to treat hardware clock as local time, matching Windows behavior.
Fix 2: Make Windows Use UTC (Registry Edit)
- Open regedit as administrator
- Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation - Create new DWORD (32-bit) named
RealTimeIsUniversal - Set value to 1
- Reboot
🆘 Emergency Recovery Toolkit
Keep these tools handy for serious issues:
- Boot-Repair-Disk: Live CD that automatically fixes GRUB issues
- GParted Live: Partition management without installation
- SystemRescue: Comprehensive recovery toolkit
- Windows installation USB: For fixing Windows bootloader
2.7 First Boot Checklist – What to Do After Installing Linux
✅ Step 1: First Login and System Update
Why it's important: Your installation media may be months old. Updates contain security patches, bug fixes, and newer software versions.
GUI Method:
- Look for "Software Updater" or "Update Manager" in applications menu
- Click "Check for Updates" and install everything
- Restart if kernel updates were installed
Terminal Method (Faster):
# Ubuntu/Debian:
sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y # Optional, handles dependencies
sudo apt autoremove -y # Remove unused packages
# Fedora:
sudo dnf upgrade --refresh
# Arch:
sudo pacman -Syu
✅ Step 2: Install Additional Drivers
Why it's important: Proprietary drivers (especially for NVIDIA graphics and some Wi-Fi chips) provide better performance and features.
Ubuntu:
- Open "Software & Updates" from applications menu
- Go to "Additional Drivers" tab
- Select proprietary driver (e.g., "Using NVIDIA driver metapackage")
- Click "Apply Changes" and restart
Terminal Method:
# Ubuntu automatic driver detection
sudo ubuntu-drivers autoinstall
# For specific NVIDIA driver
sudo apt install nvidia-driver-550 # Version may vary
Check What's Currently Used:
lspci -k | grep -A 2 -E "(VGA|3D)"
✅ Step 3: Install Media Codecs and Essential Software
Why it's important: Legal restrictions often prevent distributions from including multimedia codecs by default.
Ubuntu Restricted Extras:
sudo apt install ubuntu-restricted-extras
# Includes: Flash, MP3, DVD playback, fonts, and more
# You'll need to accept the EULA for Microsoft fonts
Essential Applications Most Users Install:
- Web Browser: Chrome, Firefox (usually preinstalled)
- Office Suite: LibreOffice (usually preinstalled)
- Media Player: VLC (
sudo apt install vlc) - Image Editor: GIMP (
sudo apt install gimp)
- PDF Reader: Okular, Evince (preinstalled)
- Cloud Storage: Nextcloud client, Dropbox
- Communication: Discord, Slack, Zoom
- Torrent Client: Transmission (preinstalled)
Install Multiple Apps at Once:
sudo apt install vlc gimp filezilla thunderbird keepassxc
✅ Step 4: Configure Firewall (UFW)
Why it's important: A firewall adds an extra layer of security, especially if you're on public networks.
Enable and Configure UFW:
# Check status
sudo ufw status
# Enable firewall (careful with SSH!)
sudo ufw enable
# Default rules (good starting point)
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Allow specific services
sudo ufw allow ssh
sudo ufw allow 80/tcp # HTTP
sudo ufw allow 443/tcp # HTTPS
# Check detailed status
sudo ufw status verbose
✅ Step 5: Set Up Backups (Timeshift)
Why it's important: System snapshots let you roll back if an update breaks something.
Install and Configure Timeshift:
# Install Timeshift
sudo apt install timeshift
# Launch from applications menu
# Or run from terminal:
sudo timeshift-gtk
Recommended Settings:
- Snapshot type: RSYNC
- Location: Choose a partition with enough space (separate from root if possible)
- Schedule: Daily (keep 5), Weekly (keep 3), Monthly (keep 2)
- Include: Only system files, exclude /home (use separate backup for personal files)
For Personal Files:
- Déjà Dup (built into GNOME) – simple encrypted backups
- rsync – manual but powerful
- Cloud sync: Nextcloud, Dropbox, Google Drive
✅ Step 6: Configure Power Management
Why it's important: Optimize battery life for laptops and performance for desktops.
Laptop Users: Install TLP
sudo apt install tlp tlp-rdw
sudo systemctl enable tlp
sudo tlp start
# Check status
sudo tlp-stat -s
Check Battery Health:
upower -i /org/freedesktop/UPower/devices/battery_BAT0
Configure Lid Close Behavior:
Edit /etc/systemd/logind.conf and set:
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=lock # Different when plugged in
Then restart service: sudo systemctl restart systemd-logind
✅ Step 7: Customize Your Desktop Environment
Why it's important: Make Linux feel like home with your preferred look and workflow.
GNOME (Ubuntu Default):
- Extensions:
sudo apt install gnome-shell-extensions - GNOME Tweaks:
sudo apt install gnome-tweaks - Extension Manager: Install from Ubuntu Software
- Popular extensions: Dash to Dock, User Themes, Clipboard Indicator
KDE Plasma (Kubuntu):
- System Settings → Appearance – endless customization
- Get New Widgets, Themes, Icons from online
Cinnamon (Linux Mint):
- System Settings → Themes – easy theming
- Applets and Desklets for extra functionality
Essential Customizations for Everyone:
- Dark Mode: Settings → Appearance → Dark
- Night Light: Settings → Displays → Night Light (reduce blue light)
- Workspaces: Enable and configure in Settings → Multitasking
- Keyboard Shortcuts: Settings → Keyboard → View and Customize
✅ Step 8: Set Up Printing and Scanning
Why it's important: Most printers work out of the box, but some need driver installation.
Printer Setup:
- Go to Settings → Printers
- Click "Add Printer"
- If detected, select and add
- If not, you may need to install drivers:
sudo apt install printer-driver-*# Install all common drivers
sudo apt install hplip# HP printers
sudo apt install gutenprint# Canon, Epson, others
Scanner Setup:
sudo apt install simple-scan # Document Scanner appsudo apt install sane-utils # Scanner backend
✅ Step 9: Configure Automatic Security Updates
Why it's important: Keep your system secure without manual intervention.
Enable Unattended Upgrades:
sudo apt install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades
# Answer "Yes" to automatically install updates
Check Configuration:
Edit /etc/apt/apt.conf.d/50unattended-upgrades to customize which updates are installed automatically.
View Logs:
cat /var/log/unattended-upgrades/unattended-upgrades.log
✅ Step 10: Install System Monitoring Tools
Why it's important: Understand your system's performance and resource usage.
GUI Monitoring Tools:
sudo apt install gnome-system-monitor # Task managersudo apt install hardinfo # System profilersudo apt install gkrellm # Lightweight system monitor
Terminal Monitoring Tools:
sudo apt install htop # Better topsudo apt install btop # Modern resource monitorsudo apt install nethogs # Monitor network per processsudo apt install iotop # Monitor disk I/O
📋 Quick Reference: First Boot Checklist
Immediate (First 10 Minutes):
- ☐ Connect to internet
- ☐ Run system updates
- ☐ Install additional drivers
- ☐ Install multimedia codecs
- ☐ Enable firewall (UFW)
Within First Hour:
- ☐ Set up Timeshift backups
- ☐ Install essential applications
- ☐ Configure power management
- ☐ Customize desktop appearance
- ☐ Set up printer/scanner
Within First Day:
- ☐ Enable automatic security updates
- ☐ Install monitoring tools
- ☐ Configure email client
- ☐ Set up cloud storage sync
Ongoing Maintenance:
- ☐ Weekly:
sudo apt update && sudo apt upgrade - ☐ Monthly: Check Timeshift snapshots
- ☐ As needed: Clean up old kernels
🎉 Congratulations! Your Linux System Is Ready
You've successfully installed Linux and completed all essential post-installation steps. Your system is now secure, up-to-date, and customized for daily use. Welcome to the Linux community!
📚 Next Steps:
- Explore the Terminal & Command Line module to master Linux basics
- Learn about software management in the next module
- Join Linux communities: r/linuxquestions, Ubuntu Forums, Ask Ubuntu
- Don't be afraid to experiment – that's how you learn!
📌 Module 02 Summary: Installing Linux
You've completed the comprehensive Linux installation module. Here's what you've learned:
Installation Methods
- Full installation vs Dual boot vs VM
- Pros and cons of each approach
- Decision guide for beginners
Boot Systems
- UEFI vs Legacy BIOS
- Secure Boot implications
- Accessing BIOS settings
USB Creation
- Rufus (Windows)
- BalenaEtcher (All platforms)
- dd command (Linux)
- Checksum verification
Disk Partitioning
- MBR vs GPT
- Root, home, swap partitions
- Partitioning scenarios
- Common mistakes
Swap Management
- Swap partition vs swap file
- How much swap you need
- Creating swap after install
- Hibernation requirements
Troubleshooting
- 8 common installation errors
- Step-by-step fixes
- Emergency recovery tools
- Dual boot time fix
First Boot Checklist (10 Essential Steps)
- System updates, drivers, codecs, essential apps
- Firewall, backups, power management
- Desktop customization, printing, automatic updates
- Monitoring tools and ongoing maintenance
🐧 Module 03 : Linux Desktop, Apps & Software
3.1 How Software Works in Linux — packages, deps & the philosophy
Every Linux distribution is built around a package format. A package is an archive containing executable files, configuration files, documentation, and metadata (name, version, dependencies, conflicts). The most common are .deb (Debian/Ubuntu) and .rpm (Red Hat/Fedora). The metadata declares which shared libraries (libc.so.6, libgtk-3.so.0) are required. The package manager reads these declarations and installs missing dependencies automatically from repositories.
Why shared libraries? Instead of each application bundling its own copy of, say, a JPEG loader, they all use the system’s libjpeg. This reduces disk usage and allows one security update to fix dozens of apps. However, it creates the famous dependency hell when two applications need different versions of the same library — that’s where modern package managers and sandboxed formats (Flatpak, Snap) shine.
📊 Example: GIMP dependencies (simplified)
gimp (2.10.30-1) depends on:
├─ libc6 (>= 2.33) [core C library]
├─ libgegl-0.4-0 (>= 0.4.32) [image processing]
├─ libgdk-pixbuf-2.0-0 [GTK image loading]
├─ libgtk-3-0 (>= 3.24) [GUI toolkit]
└─ … 40+ more
apt install gimp fetches every missing piece. The same applies to rpm-based distros with dnf. This is why you never download a single .deb from a random site and double‑click — if it was built for a different release, dependencies may not match, leading to broken system state.
apt-cache depends gimp (or dnf deplist gimp) to see the full dependency tree before installing.Most users install pre‑compiled binary packages. Some distributions (Gentoo, Source‑based) compile everything from source code on your machine. Even on Ubuntu, you can compile from source using ./configure && make && sudo make install, but it’s not recommended because the package manager loses track of those files — later updates or removals become messy. Always prefer binary packages.
3.2 Linux “App Store” vs Package Manager — GUI front‑end vs CLI engine
Modern Linux desktops include friendly app stores: they display applications with screenshots, user reviews, and one‑click install. Under the hood, they are front‑ends to the same package managers (apt, dnf, etc.) plus Flatpak and Snap. For example, GNOME Software uses PackageKit, which abstracts distro differences. These tools are perfect for casual users: they handle authentication, show progress, and integrate with system updates.
But they hide complexity: you cannot easily see exactly which packages will be installed, pin versions, or fix broken dependencies from the GUI. If the GUI crashes during an operation, you might need the terminal to recover.
The command line provides surgical control. With apt you can:
apt search <term>– search packagesapt show <pkg>– detailed metadataapt list --installed– see everythingapt upgrade --dry-run– preview changesapt-mark hold <pkg>– prevent updates
Advanced tasks like pinning (priority control) or downloading source packages are only possible via CLI. Moreover, in server environments there is no GUI at all.
| Task | GUI (Discover/Software) | CLI (apt) |
|---|---|---|
| Install app | click "install" | sudo apt install firefox |
| Remove & config | "remove" (often leaves config) | sudo apt purge firefox |
| Update all | "update all" button | sudo apt update && sudo apt upgrade -y |
| Fix broken | sometimes offers repair | sudo apt --fix-broken install |
Real mastery means being comfortable with both — the GUI for discovery, the CLI for reliability.
📌 3.2 recap
- Software centers are GUIs over package managers + Flatpak/Snap
- CLI gives full control, scripting, and recovery options
- Next: 3.3 Installing & removing safely
3.3 Installing & Removing Software Safely (without breaking your system)
1. Distribution repositories (main/restricted/universe/multiverse): millions of packages, tested for the release. Use apt install directly. Example: sudo apt install vlc.
2. PPAs (Personal Package Archives): for newer versions (e.g., ppa:libreoffice/ppa). Add with sudo add-apt-repository ppa:libreoffice/ppa && sudo apt update. Only use trusted PPAs (check launchpad.net reputation).
3. Official .deb packages from developers (Chrome, Zoom, VS Code). Download and install with sudo apt install ./google-chrome.deb. This respects dependencies. Do not use dpkg -i alone because it won’t fetch missing dependencies — always apt install on the .deb file.
4. Manual compilation / random binaries — highest risk, only if no other option.
sudo apt remove vlc– deletes binaries, keeps config files (/etc/vlc).sudo apt purge vlc– wipes config as well.sudo apt autoremove– cleans up libraries that were installed as dependencies and are no longer needed (run after removals).
To remove a PPA: sudo add-apt-repository --remove ppa:name or delete the .list file in /etc/apt/sources.list.d/.
sudo apt --fix-broken install– resolves dependency conflicts.sudo dpkg --configure -a– if dpkg was interrupted.- If a bad PPA breaks update, disable it by moving its .list file and run
sudo apt update.
📌 3.3 recap
- Prefer repos → PPAs → official .deb → other
- Remove/purge/autoremove correctly
- Next: 3.4 Flatpak, Snap & AppImage
3.4 Flatpak, Snap & AppImage — universal formats explained
Flatpak bundles an app with its own dependencies in a sandbox, yet shares common runtimes (like Freedesktop 22.08) to save space. Apps run confined; you control permissions via flatpak override or Flatseal. Main repo: Flathub (flathub.org). Commands:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak install flathub org.gimp.GIMP flatpak run org.gimp.GIMP
Flatpak apps integrate with the desktop (themes, portals) and can be updated with flatpak update. Ideal for GUI apps.
Similar container concept but with stricter mandatory updates. Snap packages are transactional and roll back automatically if an update fails. Commands: snap install gimp, snap refresh, snap remove gimp. They auto‑update every day (can be changed). Some criticize centralization and slower start. Good for CLI tools and server apps too.
No installation: download, chmod +x App, run. Ideal for portable usage or trying software without committing. No sandbox, no automatic updates. Can be integrated with tools like AppImageLauncher. Great for older distributions that lack recent packages.
| Feature | Flatpak | Snap | AppImage |
|---|---|---|---|
| Sandbox | ✅ fine-grained | ✅ strict (AppArmor) | ❌ |
| Auto‑update | optional (systemd timer) | forced by default | manual |
| Sharing runtime | yes (runtimes) | yes (core) | no (each app standalone) |
| Main repo | Flathub | Snap Store | none (direct download) |
3.5 Trusted Repositories & Software Sources — where packages come from
/etc/apt/sources.list and files under /etc/apt/sources.list.d/ define which repositories apt uses. A typical line: deb http://archive.ubuntu.com/ubuntu jammy main restricted. The GPG key (downloaded separately) ensures packages haven't been tampered with. When you add a PPA, add-apt-repository installs both the entry and the key.
Never add a repo without verifying its key fingerprint. For third‑party repos like Docker, you follow official instructions that include the key fingerprint.
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update
Now you can install nvidia driver updates from that PPA. To remove: sudo add-apt-repository --remove ppa:graphics-drivers/ppa.
3.6 Windows Software Alternatives on Linux
| Windows app | Linux alternative(s) | Install method |
|---|---|---|
| Microsoft Office | LibreOffice, OnlyOffice, WPS Office | apt / flatpak |
| Adobe Photoshop | GIMP, Krita | apt / flatpak |
| Adobe Illustrator | Inkscape | apt / flatpak |
| Adobe Premiere | Kdenlive, DaVinci Resolve, Shotcut | flatpak / .deb (resolve) |
| Outlook | Thunderbird, Evolution | apt |
| Visio | draw.io, Dia | snap / flatpak |
| NotePad++ | Kate, Geany, VS Codium | apt / flatpak |
| Spotify | Spotify (client) | snap / flatpak |
| Zoom / Teams | Zoom .deb, Teams (PWA / unofficial) | deb / flatpak |
For apps that have no native version, consider Wine or Bottles (Flatpak) to run Windows software, but expect some friction. Virtual machines are another option.
3.7 Updating Linux Without Breaking the System
- Before upgrading, run
apt list --upgradableto see what will change. - Use
apt upgrade(neverdist-upgradeunless you understand it). - Hold back critical packages:
sudo apt-mark hold linux-image-generic - Use Timeshift to take filesystem snapshots before large updates.
- Enable automatic security updates via
unattended-upgrades.
3.8 Updating Linux Using apt (update & upgrade) — the definitive guide
sudo apt update downloads the latest package lists from all configured repositories. It does not install anything — it simply tells your system what new versions are available. Always run this before any install or upgrade.
sudo apt upgrade installs newer versions of packages you already have, but it never removes packages. If a new version requires a dependency that must be removed, the upgrade is held back. To see held packages: apt-mark showhold.
sudo apt full-upgrade performs the same as upgrade but will remove packages if necessary to complete the upgrade. This is useful when switching between major releases (e.g., Ubuntu 22.04 → 22.10) but can be risky on a stable system — run it only when you intend to allow removals.
Standard daily driver: sudo apt update && sudo apt upgrade -y.
Always simulate: apt upgrade --dry-run shows what would happen. Logs are stored in /var/log/apt/history.log.
Module 04 : Terminal & Command Line (Beginner)
This module introduces the Linux terminal - the powerful command-line interface that gives you complete control over your system. Learn essential commands, shortcuts, and best practices to become productive in the terminal.
4.1 What Is Terminal & Why Linux Uses It
The Terminal (also called console or command line) is a text-based interface to control your computer.
Unlike graphical interfaces, the terminal gives you direct access to the system, allowing you to perform complex tasks quickly with just a few keystrokes.
🎯 Why Terminal is Powerful:
- Speed: Faster than clicking through menus
- Automation: Script repetitive tasks
- Power: Access advanced system features
- Remote Access: Control servers over SSH
- Consistency: Same commands work across different Linux systems
4.2 Understanding Shells (bash, zsh)
A Shell is the program that interprets your commands in the terminal. It's your interface to the operating system.
🐚 Common Shell Types:
| Shell | Description | Best For | Default Color |
|---|---|---|---|
| bash | Bourne Again SHell - Most common, default on most systems | Beginners & compatibility | Blue prompt |
| zsh | Z Shell - Feature-rich with autocomplete & themes | Power users & customization | Green prompt |
| fish | Friendly Interactive SHell - User-friendly with syntax highlighting | Those who want modern features | Yellow prompt |
🔍 How to Check Your Current Shell:
# Check which shell you're usingecho $SHELL# Output example: /bin/bash# See all available shells on your systemcat /etc/shells
user@computer:~$) shows your username, computer name, and current directory.
4.3 Basic Commands (ls, cd, pwd, clear)
These four commands are the foundation of Linux navigation. Master these, and you can explore anywhere!
🚀 The Essential Four:
| Command | What It Does | Basic Usage | Common Options |
|---|---|---|---|
pwd |
Print Working Directory - Shows where you are | pwd |
(no options) |
ls |
List files and directories | ls |
-l (details), -a (all), -h (human readable) |
cd |
Change Directory - Move to different folder | cd folder_name |
cd .. (go up), cd ~ (go home) |
clear |
Clear screen - Makes terminal empty | clear |
Ctrl + L (keyboard shortcut) |
🎮 Hands-On Practice:
# 1. See where you arepwd# Output: /home/your_username# 2. List files in current directorylsls -la # List all files with details# 3. Navigate to Documents foldercd Documentspwd # Now shows: /home/your_username/Documents# 4. Go back homecd ~# OR simply: cd# 5. Clean up the screenclear
Documents ≠ documents ≠ DOCUMENTS
4.4 Working with Files & Directories
Now that you can navigate, let's learn how to create and organize your files and folders.
📁 File & Directory Management Commands:
| Command | Purpose | Example | What Happens |
|---|---|---|---|
mkdir |
Make Directory (create folder) | mkdir my_folder |
Creates "my_folder" |
touch |
Create empty file | touch file.txt |
Creates "file.txt" (0 bytes) |
cat |
View file contents | cat file.txt |
Shows file content |
nano |
Simple text editor | nano notes.txt |
Opens editor to create/edit |
rmdir |
Remove empty directory | rmdir empty_folder |
Deletes empty folder |
🛠️ Practical Example - Organize Your Files:
# Create a project structuremkdir my_projectcd my_project# Create subfoldersmkdir docs images codels # Shows: docs images code# Create filestouch README.txtcd docstouch notes.txt# Add content to a fileecho "Project started on $(date)" > notes.txtcat notes.txt # View the content# Edit with nanonano notes.txt# Add more text, then Ctrl+X to save and exit
📝 Nano Editor Basics:
• Ctrl + O : Save file
• Ctrl + X : Exit Nano
• Ctrl + K : Cut line
• Ctrl + U : Paste line
• Ctrl + W : Search
• Ctrl + \ : Replace
All shortcuts shown at bottom of screen
4.5 Copy, Move & Delete Safely
These commands manipulate files. Be careful with delete - there's no "Recycle Bin" in terminal!
⚠️ Safety First - The Dangerous Commands:
| Command | Purpose | Safe Version | Danger Level |
|---|---|---|---|
cp |
Copy files/directories | cp -i file1 file2 |
Low |
mv |
Move or rename files | mv -i old new |
Medium |
rm |
Remove (delete) files | rm -i file.txt |
HIGH |
rm -rf / |
NEVER USE THIS! | Just don't | SUICIDE |
🔧 Safe Operations with Examples:
# COPYING FILEScp file.txt file_backup.txt # Basic copycp -i file.txt file_backup.txt # Ask before overwritingcp -r folder/ backup/ # Copy folder recursively# MOVING/RENAMINGmv file.txt new_name.txt # Rename filemv file.txt Documents/ # Move to foldermv -i old.txt new.txt # Ask before overwrite# DELETING (BE CAREFUL!)rm file.txt # Delete single filerm -i important.txt # ASK before deletingrm -r old_folder/ # Delete folder with contentsrmdir empty_folder/ # Delete ONLY if empty
🛡️ Safety Aliases (Add to ~/.bashrc):
# Make commands ask before doing dangerous thingsalias cp='cp -i' # Ask before overwriting copyalias mv='mv -i' # Ask before overwriting movealias rm='rm -i' # ASK before deleting anything# Prevent accidental deletion of system filesalias rm='rm -I --preserve-root'
rm -rf / or rm -rf /* - it will delete EVERYTHING on your system!
~/.local/share/Trash (GUI deletions) or use file recovery tools immediately.
4.6 Command History, Autocomplete & Shortcuts
These productivity features will make you 10x faster in the terminal. Learn them early!
📜 Command History - Your Time Machine:
# View command historyhistory # Shows all commands you've typedhistory 10 # Show last 10 commands!45 # Run command #45 from history!! # Run last command again!ls # Run last 'ls' commandCtrl + R # Search history (reverse-i-search)# Type to search, press Enter to run, Ctrl+C to cancel
🚀 Tab Autocomplete - Your Best Friend:
• Type
cd Docu then press Tab → completes to cd Documents/• Press Tab twice → shows all possible completions
• Works for commands, files, folders, and options!
⌨️ Essential Keyboard Shortcuts:
| Shortcut | Action | Why It's Useful |
|---|---|---|
| Tab | Auto-complete | Saves typing, prevents typos |
| Ctrl + A | Move cursor to beginning | Quick edit long commands |
| Ctrl + E | Move cursor to end | Add arguments quickly |
| Ctrl + U | Cut to beginning | Clear current command |
| Ctrl + K | Cut to end | Remove rest of line |
| Ctrl + Y | Paste cut text | Undo Ctrl+U/K cuts |
| Ctrl + R | Search history | Find old commands fast |
| Ctrl + C | Cancel/stop command | Stop running programs |
| Ctrl + D | Exit shell/logout | Close terminal session |
| Ctrl + L | Clear screen | Better than typing 'clear' |
| ↑ / ↓ | Navigate history | Cycle through past commands |
🎮 Practice Exercise:
# 1. Type this long command:echo "Hello this is a long command to practice shortcuts"# 2. Press Ctrl+A to go to beginning# 3. Press Ctrl+K to cut everything# 4. Type: ls -la# 5. Press Ctrl+Y to paste back the echo command# 6. Press Ctrl+C to cancel# Practice tab completion:cd /usr/share/ # Then press Tab multiple timesls /e # Press Tab → completes to /etc/
4.7 Linux Aliases - Custom Command Shortcuts
Aliases are your personal command shortcuts - create custom names for frequently used commands!
🎯 Why Create Aliases?
- Save Time: Shorten
ls -lato justll - Reduce Errors: Avoid typos in complex commands
- Create Workflows: Chain multiple commands together
- Personalize: Build your own command language
🔧 Creating Aliases:
# Temporary alias (lasts only this session)alias ll='ls -la'll # Now works as ls -la!# Permanent alias (add to ~/.bashrc)nano ~/.bashrc# Add at bottom:alias ll='ls -la'alias update='sudo apt update && sudo apt upgrade'alias cl='clear'alias ..='cd ..'# Save (Ctrl+X, Y, Enter) then reload: source ~/.bashrc
🌟 Useful Beginner Aliases:
# Navigationalias home='cd ~'alias ..='cd ..'alias ...='cd ../..'alias ....='cd ../../..'# Listingalias l='ls -CF'alias la='ls -A'alias ll='ls -la'alias lh='ls -lh'# Safety first!alias rm='rm -i' # Ask before deletingalias cp='cp -i' # Ask before overwritingalias mv='mv -i' # Ask before moving# System infoalias cpu='top -o %CPU'alias mem='top -o %MEM'alias disk='df -h'alias space='du -sh * | sort -h'
🛠️ Managing Your Aliases:
# List all current aliasesalias# OR: alias -p# Check specific aliastype ll# Output: ll is aliased to `ls -la`# Remove an aliasunalias ll# Create separate alias file (recommended)nano ~/.bash_aliases# Add all aliases here, then add this to ~/.bashrc:if [ -f ~/.bash_aliases ]; then . ~/.bash_aliasesfi
🎮 Hands-On Exercise:
# 1. Create a test aliasalias greet='echo "Hello from your alias!"'greet # Should show greeting# 2. Create update shortcutalias update-system='sudo apt update && sudo apt upgrade -y'# 3. Make it permanentecho 'alias ll="ls -la"' >> ~/.bashrcecho 'alias update="sudo apt update && sudo apt upgrade -y"' >> ~/.bashrcsource ~/.bashrc # Reload# 4. Test your new powers!ll ~/Documents# (Might need sudo for update if not Ubuntu/Debian)
4.8 Common Beginner Terminal Mistakes
Everyone makes mistakes when learning terminal. Here's how to avoid (and recover from) the most common ones.
🚫 Top 10 Terminal Mistakes & Solutions:
| Mistake | Why It Happens | How to Avoid | How to Fix |
|---|---|---|---|
rm -rf / |
Thinking it will "remove folder root" | NEVER type this. Use aliases for safety | Too late. Reinstall OS. |
Wrong case: Documents vs documents |
Linux is case-sensitive | Use Tab to autocomplete | Check spelling and case |
| Spaces in file names without quotes | touch my file.txt creates TWO files |
Use underscores: my_file.txt |
Use quotes: touch "my file.txt" |
Forgetting sudo |
Need admin rights for system changes | Error will tell you "Permission denied" | Add sudo before command |
Using wrong slash: \ vs / |
Windows uses backslash, Linux uses forward | Linux always uses / |
Replace \ with / |
| Command not found | Typo or package not installed | Use Tab, check spelling | Install package: sudo apt install package_name |
| Accidental Ctrl + D | Meant to cancel but exited terminal | Use Ctrl + C to cancel | Just reopen terminal |
Forgetting to cd into folder |
Running command in wrong directory | Always check with pwd first |
cd to correct folder |
| Missing arguments | rm needs file name |
Read error messages carefully | Add required arguments |
| Running command as wrong user | Need sudo or different user |
Check who you are: whoami |
Use sudo or switch user |
🔧 Recovery Techniques:
# 1. Stuck in a program?Press: Ctrl + C # Cancel current commandPress: Ctrl + Z # Pause program (bg/fg to manage)Press: Ctrl + D # Send EOF (may exit)# 2. Typed wrong command?Press: Ctrl + C # Stop it immediatelyUse: history # Find correct commandUse: !! # Rerun last command# 3. Deleted wrong file?# Check trash: ls ~/.local/share/Trash/files/# Use recovery tools immediately (testdisk, photorec)# 4. Lost in filesystem?pwd # Where am I?cd ~ # Go homecd / # Go to rootcd - # Go to previous directory
🛡️ Preventive Safety Measures:
# 1. Create safety aliases in ~/.bashrcalias rm='rm -i' # Ask before deletealias cp='cp -i' # Ask before overwritealias mv='mv -i' # Ask before move# 2. Backup important files regularlycp important.txt important.txt.backup# OR use version control: git init# 3. Test commands with echo firstecho rm *.txt # Shows what WOULD be deleted# Then remove 'echo' to actually run# 4. Use dry-run options when availablersync -nav source/ destination/ # -n = dry run
🎮 Practice - Making (Safe) Mistakes:
# Create a safe practice areamkdir ~/terminal_practicecd ~/terminal_practicetouch file1.txt file2.txt file3.txt# Practice common scenarios# 1. Case sensitivityls FILE1.TXT # Fails - wrong casels file1.txt # Works# 2. Spaces in namestouch "my document.txt" # Use quotesls my\ document.txt # OR use backslash# 3. Permission errorsmkdir /system_folder # Fails - need sudosudo mkdir /system_folder # Works with sudo# 4. Tab completionls f # Completes to file ls fi # Shows all matches # Clean upcd ~rm -r terminal_practice/
rm, format, or dd - STOP. Double-check everything.
Internet, Browsers & Networking – Connectivity Mastery
This module covers everything about staying connected on Linux. You'll learn how to manage browsers, fix network issues, use Bluetooth devices, and secure your connection with firewalls and VPNs.
6.1 Browsers on Linux (Firefox, Chrome)
Linux supports all major browsers. Firefox is usually pre-installed and optimized for Linux, while Google Chrome and Chromium are available for download.
- Firefox: Default on most distributions, privacy-focused
- Chrome: Available as .deb or .rpm package
- Chromium: Open-source version of Chrome
- Brave: Privacy browser with built-in ad blocking
6.2 Network Manager Explained
NetworkManager is the default networking service on most Linux distributions. It manages Wi-Fi, Ethernet, VPN, and mobile broadband connections through both GUI and CLI.
| Tool | Purpose | How to Access |
|---|---|---|
| nm-applet | System tray network icon | Click system tray icon |
| nmtui | Text-based UI for terminal | Run nmtui in terminal |
| nmcli | Command-line interface | Run nmcli commands |
nmtui when GUI isn't working – it's a lifesaver!
6.3 Wi-Fi & Ethernet Troubleshooting
Network issues are common but usually easy to fix. Follow this troubleshooting checklist:
- Check if Wi-Fi is enabled: Look for airplane mode or hardware switch
- Verify driver installation: Run
lspci -k | grep -A 2 -i network - Restart NetworkManager:
sudo systemctl restart NetworkManager - Check connection details:
ip addr showorifconfig - Test DNS:
ping 8.8.8.8(if this works but websites don't, it's DNS)
6.4 Bluetooth Setup & Troubleshooting
Linux has excellent Bluetooth support for headphones, speakers, mice, and keyboards. Most distributions include Bluez (the standard Bluetooth stack).
Quick Setup:
- Ensure Bluetooth is enabled: Click system tray icon or check settings
- Put your device in pairing mode
- Search for devices and connect
Complete Bluetooth Installation & Setup:
| Task | Command | Purpose |
|---|---|---|
| Install Bluetooth stack | sudo apt install bluez* |
Install all Bluez packages |
| Install Bluetooth manager | sudo apt install blueman |
GUI tool for Bluetooth management |
| Enable Bluetooth service | sudo systemctl enable bluetooth.service |
Start Bluetooth on boot |
| Start Bluetooth service | sudo systemctl start bluetooth.service |
Start Bluetooth immediately |
| Check service status | sudo systemctl status bluetooth.service |
Verify Bluetooth is running |
Common Issues & Fixes:
| Problem | Solution | Description |
|---|---|---|
| Bluetooth not showing in GUI | sudo systemctl start bluetooth |
Start the Bluetooth service |
| Device not found | bluetoothctl then scan on |
Use command-line tool to search |
| Audio quality poor | sudo apt install pulseaudio-module-bluetoothpulseaudio -k |
Install Bluetooth audio support & restart PulseAudio |
| Connection drops frequently | sudo btmgmt power offsudo hciconfig hci0 up |
Disable power saving & bring interface up |
| Missing Bluetooth packages | sudo apt install aptitudesudo aptitude install bluetooth |
Use aptitude for better dependency handling |
| Bluetooth service won't start | sudo /etc/init.d/bluetooth restartservice bluetooth restart |
Alternative service restart commands |
| Bluetooth not enabled at boot | sudo systemctl enable bluetoothCheck: systemctl is-enabled bluetooth |
Ensure Bluetooth starts automatically |
Step-by-Step Troubleshooting Guide:
- Check if Bluetooth adapter is detected:
lsusb | grep -i bluetooth hciconfig -a bluetoothctl list - Enable and start the service:
sudo systemctl enable bluetooth sudo systemctl start bluetooth sudo systemctl status bluetooth - Install missing packages:
sudo apt update sudo apt install bluez blueman bluez-tools sudo apt install pulseaudio-module-bluetooth - Using bluetoothctl (command-line tool):
bluetoothctl # Enter Bluetooth control power on # Turn Bluetooth on agent on # Enable agent default-agent # Set as default scan on # Start scanning (wait 30 sec) devices # List found devices pair XX:XX:XX:XX:XX # Pair with device MAC connect XX:XX:XX:XX:XX # Connect to device trust XX:XX:XX:XX:XX # Trust device for auto-connect exit # Exit bluetoothctl
bluetoothctl shows "No default controller available", run:sudo rmmod btusb then sudo modprobe btusb to reload Bluetooth drivers.
- For SysV init:
sudo service bluetooth restart - For systemd:
sudo systemctl restart bluetooth - Check your init system:
ps -p 1 -o comm=
- Install packages:
sudo apt install bluez blueman - Enable service:
sudo systemctl enable --now bluetooth - Check adapter:
hciconfig -a - Restart if needed:
sudo systemctl restart bluetooth
6.5 Checking Network Using Terminal
The terminal provides powerful tools for diagnosing network issues. Here are essential commands:
| Command | What It Does | Example |
|---|---|---|
ping |
Test connection to a server | ping google.com |
ip addr |
Show network interfaces & IPs | ip addr show |
nslookup |
Check DNS resolution | nslookup google.com |
traceroute |
Trace network path to server | traceroute google.com |
ss or netstat |
Show active connections | ss -tulpn |
ip command replaces old ifconfig - learn it for modern systems.
6.6 Firewall Basics (UFW Explained)
UFW (Uncomplicated Firewall) is an easy-to-use firewall for Linux. It's a frontend for iptables that simplifies firewall management.
Basic UFW Commands:
sudo ufw enable # Turn on firewall
sudo ufw disable # Turn off firewall
sudo ufw status # Check status
sudo ufw allow ssh # Allow SSH (port 22)
sudo ufw allow 80/tcp # Allow HTTP
sudo ufw deny from 192.168.1.10 # Block specific IP
Common Use Cases:
- Allow web server:
sudo ufw allow 80,443/tcp - Allow specific application:
sudo ufw allow OpenSSH - Deny all incoming, allow all outgoing (default)
- Rate limiting:
sudo ufw limit ssh
6.7 VPN Usage & Privacy on Linux
Using a VPN on Linux is straightforward. Most VPN providers offer Linux apps, or you can use NetworkManager's built-in VPN support.
VPN Setup Methods:
- Official VPN apps: Many providers have .deb/.rpm packages
- NetworkManager integration: Import .ovpn files
- Command line: Use
openvpnorwireguardtools - Browser extensions: For browser-only VPN
Popular Linux VPN Clients:
- OpenVPN: Standard protocol with GUI (network-manager-openvpn)
- WireGuard: Modern, fast, simple configuration
- NordVPN/ExpressVPN: Official Linux clients available
Privacy Tips:
- Use DNS over HTTPS in Firefox/Chrome
- Consider using Tor Browser for maximum anonymity
- Regularly check for DNS leaks: dnsleaktest.com
- Disable unnecessary network services
Essential Linux Commands – Complete Reference & Daily Usage
This module provides a comprehensive reference of essential Linux commands organized by category. Each command includes syntax, options, practical examples, and real-world use cases.
💡 How to use this module: Bookmark this page and return whenever you need to understand a specific command. Each section is self-contained with command details, common options, and beginner-friendly explanations.
sudo or root privileges.
Always understand a command before running it, especially with sudo.
10.1 File System Navigation Commands
These commands help you move around and explore the Linux file system. Mastering navigation is the first step to terminal confidence.
📁 pwd – Print Working Directory
Purpose: Shows the full path of your current directory.
pwd
# Output: /home/username/Documents
Real-world use: When you're lost in the terminal and need to know exactly where you are.
📋 ls – List Directory Contents
Purpose: Displays files and directories in the current location.
| Option | Description | Example |
|---|---|---|
ls -l | Long format (permissions, size, date) | ls -l /home |
ls -a | Show hidden files (starting with .) | ls -la |
ls -h | Human-readable sizes | ls -lh |
ls -t | Sort by modification time | ls -lt |
ls -R | Recursive (show subdirectories) | ls -R /etc |
ls -la is the most commonly used combination.
🔄 cd – Change Directory
Purpose: Move between directories.
cd /path | Go to specific directory | cd /var/log |
cd ~ or cd | Go to home directory | cd ~ |
cd .. | Go up one level | cd ../.. (up two levels) |
cd - | Go to previous directory | cd - |
🌳 tree – Display Directory Structure
Purpose: Shows directories and files in a tree-like format.
tree
tree -L 2 # Limit to 2 levels deep
tree -a # Include hidden files
Install if missing: sudo apt install tree
📌 pushd / popd – Directory Stack
Purpose: Navigate between multiple directories efficiently.
pushd /var/log # Save current dir and move to /var/log
pushd /etc # Save and move to /etc
popd # Return to previous directory
dirs # Show directory stack
10.2 File & Directory Management Commands
Create, copy, move, rename, and delete files and directories safely.
📄 touch – Create Empty File / Update Timestamp
touch file.txt # Create new empty file
touch -t 202502111430 file.txt # Set specific timestamp
touch file{1..5}.txt # Create file1.txt through file5.txt
📂 mkdir – Create Directories
mkdir newfolder
mkdir -p parent/child/grandchild # Create nested directories
mkdir dir_{1..3} # Create dir_1, dir_2, dir_3
mkdir -m 755 securedir # Create with specific permissions
🗑️ rm – Remove Files & Directories
| Command | Description | Example |
|---|---|---|
rm file.txt | Remove single file | rm old.txt |
rm -r folder | Remove directory and contents | rm -r downloads/ |
rm -f file | Force remove (no confirmation) | rm -f log.txt |
rm -rf /path | ⚠️ Dangerous: force recursive delete | rm -rf temp/ |
rm -i *.txt | Interactive (ask before each) | rm -i *.log |
📋 cp – Copy Files & Directories
cp source dest | Copy file | cp file.txt backup.txt |
cp -r dir1 dir2 | Copy directory recursively | cp -r /etc /etc-backup |
cp -i file dest | Interactive (ask before overwrite) | cp -i data.txt /backup/ |
cp -p file dest | Preserve permissions & timestamps | cp -p config.conf /etc/ |
cp -a source dest | Archive mode (preserve all attributes) | cp -a /home/user /backup/ |
✂️ mv – Move / Rename
mv oldname.txt newname.txt # Rename file
mv file.txt /path/to/destination/ # Move file
mv -i source dest # Interactive (ask before overwrite)
mv -u source dest # Update - move only when source is newer
mv folder1 folder2 # Rename or move directory
🔗 ln – Create Links
Hard link vs Soft link (symlink):
ln file.txt hardlink.txt # Hard link (same inode)
ln -s /original/file symlink # Soft/symbolic link (shortcut)
ln -s /usr/bin/python3 python # Create alias for command
10.3 File Viewing & Editing Commands
View file contents without opening full editors, or edit directly in terminal.
👁️ cat – Concatenate & Display
cat file.txt # Display entire file
cat file1.txt file2.txt > combined.txt # Merge files
cat > newfile.txt # Create file (Ctrl+D to save)
cat -n code.py # Show with line numbers
📖 less / more – Page Through Files
less is more powerful than more (backwards navigation allowed).
less /var/log/syslog
dmesg | less # Pipe output to less
Navigation: Space (next page), b (previous), g (top), G (bottom), / (search), q (quit)
🔍 head / tail – View Beginning/End of Files
head file.txt | Show first 10 lines | head -n 20 file.txt (20 lines) |
tail file.txt | Show last 10 lines | tail -n 50 file.txt (50 lines) |
tail -f logfile.log | Follow mode (live updates) | tail -f /var/log/syslog |
tail -f -n 100 app.log | Follow with initial 100 lines | Debugging applications |
tail -f is essential for watching log files in real-time.
📝 nano – Simple Terminal Text Editor
Best for beginners - intuitive and easy to use.
nano file.txt # Open file
nano -l file.txt # Show line numbers
nano -B file.txt # Create backup (.bak)
Shortcuts: Ctrl+O (save), Ctrl+X (exit), Ctrl+W (search), Ctrl+K (cut line)
⚡ vim – Advanced Text Editor
Powerful but has learning curve. Modes: Normal, Insert, Visual, Command.
vim file.txt # Open file
vim +20 file.txt # Open at line 20
vimdiff file1.txt file2.txt # Compare files
Essential vim commands: i (insert), :w (save), :q (quit), :wq (save & quit), u (undo)
📊 stat – Display File Status
stat file.txt
# Output includes: Size, Permissions, Access/Modify/Change timestamps, Inode
Useful for: Checking when file was actually modified vs changed permissions.
🔢 nl – Number Lines
nl script.sh # Show with line numbers
nl -b a file.txt # Number all lines (including blank)
10.4 File Permissions & Ownership Commands
Control who can read, write, and execute files. Essential for security and multi-user systems.
User(owner) | Group | Others → Example: 755 = rwxr-xr-x
🔐 chmod – Change File Permissions
Numeric mode (octal):
chmod 755 script.sh # rwxr-xr-x (owner: all, group/others: read/execute)
chmod 644 file.txt # rw-r--r-- (owner: read/write, others: read only)
chmod 600 private.key # rw------- (owner only, for SSH keys)
chmod 777 file ⚠️ Dangerous: read/write/execute for everyone
Symbolic mode:
chmod u+x script.sh # Add execute for user
chmod g-w file.txt # Remove write for group
chmod o+r file.txt # Add read for others
chmod a+x script.sh # Add execute for all (ugo)
chmod -R 755 directory/ # Recursive change
👑 chown – Change File Owner
⚡ Requires sudo privileges.
sudo chown username file.txt # Change owner
sudo chown username:groupname file.txt # Change owner and group
sudo chown :groupname file.txt # Change only group
sudo chown -R username:group directory/ # Recursive
sudo chown www-data:www-data /var/www/html - Set web server ownership
👥 chgrp – Change Group Ownership
sudo chgrp developers project/ # Change group to 'developers'
sudo chgrp -R staff /shared/ # Recursive group change
🎭 umask – Set Default Permissions
Purpose: Determines default permissions for new files/directories.
umask # Show current umask (usually 0022)
umask 077 # New files: 600, directories: 700 (private)
umask 022 # New files: 644, directories: 755 (default)
Calculation: File permissions = 666 - umask, Directory = 777 - umask
🔒 chattr – Change File Attributes (Advanced)
⚡ Root privileges required. Sets immutable/append-only flags.
sudo chattr +i important.conf # Make file immutable (can't be deleted/modified)
sudo chattr -i important.conf # Remove immutable flag
sudo chattr +a logfile.log # Append-only mode
lsattr file.txt # List attributes
10.5 Process Management Commands
Monitor, control, and terminate running programs and processes.
📊 ps – Process Status
Purpose: Snapshot of current processes.
ps | Processes in current shell | ps |
ps aux | All processes (BSD syntax) | ps aux | grep firefox |
ps -ef | All processes (standard syntax) | ps -ef --forest (tree view) |
ps -u username | Processes for specific user | ps -u www-data |
ps -C command | Processes by command name | ps -C apache2 |
Common columns: PID (Process ID), %CPU, %MEM, VSZ, RSS, TTY, STAT, START, TIME, COMMAND
📈 top / htop – Interactive Process Viewer
top # Default process viewer
htop # Enhanced, color-coded, easier to use
top -u username # Show only user's processes
top -p 1234,5678 # Monitor specific PIDs
top shortcuts: q (quit), k (kill process), u (filter by user), 1 (show CPU cores)
sudo apt install htop
🛑 kill / pkill – Terminate Processes
| Signal | Number | Purpose | Example |
|---|---|---|---|
| SIGTERM | 15 | Graceful termination (default) | kill 1234 |
| SIGKILL | 9 | Force kill (cannot be ignored) | kill -9 1234 |
| SIGHUP | 1 | Hangup (reload config) | kill -1 1234 |
| SIGSTOP | 19 | Pause process | kill -19 1234 |
| SIGCONT | 18 | Continue paused process | kill -18 1234 |
pkill - kill by name:
pkill firefox # Kill all firefox processes
pkill -f "python script.py" # Kill by full command line
pkill -u username # Kill all processes of user
kill (SIGTERM) before kill -9 (SIGKILL).
⚖️ nice / renice – Process Priority
Priority range: -20 (highest) to 19 (lowest). Default: 0.
nice -n 10 ./backup-script.sh # Start with lower priority
sudo renice -5 -p 1234 # Change priority of PID 1234 (higher)
sudo renice +5 -u username # Lower priority for user's processes
nice for CPU-intensive background tasks.
⬇️⬆️ bg / fg – Job Control
command & # Start process in background
Ctrl+Z # Suspend foreground process
bg # Resume suspended job in background
fg # Bring background job to foreground
jobs # List background jobs
kill %1 # Kill job number 1
🔄 nohup – Run Immune to Hangups
Purpose: Continue running after terminal closes.
nohup long-script.sh & # Run in background, survives logout
nohup python server.py > output.log 2>&1 & # With custom log file
Output goes to nohup.out by default.
🖥️ screen / tmux – Terminal Multiplexers
screen (pre-installed on most systems):
screen -S session_name # Start named session
Ctrl+A, D # Detach from session
screen -ls # List sessions
screen -r session_name # Reattach to session
tmux (more modern): sudo apt install tmux
tmux new -s session_name
Ctrl+B, D # Detach
tmux attach -t session_name
10.6 System Information Commands
Get details about your Linux system, kernel, hardware, and environment.
🖥️ uname – System Information
uname -a # All system information (kernel, hostname, arch)
uname -r # Kernel release version
uname -m # Machine hardware (x86_64, aarch64)
uname -n # Network node hostname
Example output: Linux mypc 5.15.0-91-generic #101-Ubuntu SMP x86_64
🏷️ hostname – System Hostname
hostname # Show current hostname
sudo hostname new-name # Temporarily change hostname
hostname -I # Show IP addresses (capital i)
hostnamectl # Detailed hostname info (systemd)
Permanent change: Edit /etc/hostname and /etc/hosts
⏰ uptime – System Running Time
uptime
# 14:23:01 up 3 days, 2:15, 3 users, load average: 0.08, 0.12, 0.10
Shows: Current time, uptime, logged-in users, load averages (1, 5, 15 minutes)
👤 whoami / id – User Identity
whoami # Current username
id # User ID, group ID, groups
id username # Info about specific user
groups # Show groups for current user
📅 date / cal – Date & Calendar
date # Current date/time
date +"%Y-%m-%d %H:%M:%S" # Custom format
sudo date -s "2025-02-11 15:30:00" # Set date (requires sudo)
cal # Current month calendar
cal 2025 # Full year calendar
cal -3 # Previous, current, next month
🧮 bc – Command Line Calculator
echo "12 * 5" | bc # Basic arithmetic
echo "scale=2; 10/3" | bc # Decimal precision
bc -l # Start interactive mode with math library
📢 echo – Display Text
echo "Hello World"
echo $HOME # Show variable value
echo -e "Line1\nLine2" # Enable escape sequences
echo -n "No newline" # Suppress trailing newline
🌍 env – Environment Variables
env # Show all environment variables
export MYVAR="value" # Set environment variable
unset MYVAR # Remove variable
echo $PATH # Show executable search path
~/.bashrc to make environment variables permanent.
🔄 which / whereis – Locate Commands
which python # Show path to executable
which -a python # Show all matches in PATH
whereis python # Show binary, source, man pages
10.7 User Management Commands
Create, modify, and delete users and groups. ⚡ All commands require sudo.
👤 useradd / adduser – Create Users
useradd (low-level):
sudo useradd username # Create user (basic)
sudo useradd -m -s /bin/bash username # Create with home dir and shell
sudo useradd -u 1500 -g groupname username # Specific UID and primary group
adduser (friendly, recommended):
sudo adduser username # Interactive, creates home, prompts for password
✏️ usermod – Modify Users
sudo usermod -aG sudo username # Add user to sudo group (Ubuntu)
sudo usermod -aG docker username # Add to docker group
sudo usermod -s /bin/zsh username # Change default shell
sudo usermod -l newname oldname # Change username
sudo usermod -L username # Lock user account
sudo usermod -U username # Unlock user account
-aG (append) with groups, never -G alone (removes other groups).
🗑️ userdel – Delete Users
sudo userdel username # Remove user
sudo userdel -r username # Remove user and home directory
sudo userdel -f username # Force removal (even if logged in)
🔑 passwd – Change Passwords
passwd # Change own password
sudo passwd username # Change another user's password
sudo passwd -l username # Lock password (disable login)
sudo passwd -u username # Unlock password
sudo passwd -e username # Expire password (force change on next login)
👥 groupadd / groupdel – Manage Groups
sudo groupadd groupname # Create new group
sudo groupdel groupname # Delete group
sudo groupmod -n newname oldname # Rename group
sudo gpasswd -d username groupname # Remove user from group
📋 who / w / last – Login Information
who # Who is logged in
w # More detailed: what users are doing
last # Login history (reads /var/log/wtmp)
last -n 10 # Last 10 logins
lastb # Failed login attempts
🔄 su – Switch User
su - username # Switch to user with their environment
su - # Switch to root (requires root password)
sudo su - # Switch to root using sudo (Ubuntu style)
10.8 Network Commands
Configure, monitor, and troubleshoot network connections.
🌐 ip – Modern Network Configuration
Replacement for deprecated ifconfig.
ip addr show # Show IP addresses
ip link show # Show network interfaces
ip route show # Show routing table
sudo ip addr add 192.168.1.100/24 dev eth0 # Add IP address
sudo ip link set eth0 up/down # Enable/disable interface
📶 ping – Test Connectivity
ping google.com # Ping until Ctrl+C
ping -c 4 8.8.8.8 # Send 4 packets
ping -i 2 -c 10 example.com # 2 second intervals
ping -s 1472 example.com # Set packet size
Return codes: 0 (host reachable), 1 (unreachable), 2 (other error)
📊 netstat / ss – Network Statistics
ss is faster, modern replacement for netstat.
ss -tuln # Show listening ports (tcp, udp, listening, numeric)
ss -tup # Show established connections with process
netstat -i # Interface statistics
netstat -r # Routing table
ss -tuln | grep :80 to check if web server is running.
🔍 nslookup / dig – DNS Lookup
nslookup google.com # Basic DNS query
dig google.com # Detailed DNS information
dig -x 8.8.8.8 # Reverse lookup (IP to hostname)
dig @8.8.8.8 example.com # Use specific DNS server
dig MX gmail.com # Query mail exchange records
🛤️ traceroute – Network Path
traceroute google.com # Show path packets take
mtr google.com # Combined traceroute + ping (real-time)
tracepath example.com # Similar, no root needed
📡 wget / curl – Download Files
wget https://example.com/file.zip # Download file
wget -c https://example.com/large.zip # Resume download
wget -r -np -nH --cut-dirs=1 https://site.com/files/ # Recursive download
curl -O https://example.com/file.zip # Download (save as filename)
curl -o custom.zip https://example.com/file.zip # Download with custom name
curl -I https://example.com # Fetch HTTP headers only
📱 nmcli – NetworkManager CLI
For systems with NetworkManager (most desktop distros).
nmcli dev status # Device status
nmcli con show # Show connections
nmcli con up/down id "Connection Name" # Connect/disconnect
nmcli dev wifi list # Scan WiFi networks
nmcli dev wifi connect SSID password PASSWORD # Connect to WiFi
10.9 Package Management Commands
Install, update, and remove software on Debian/Ubuntu systems.
📦 apt – Advanced Package Tool
Modern, user-friendly package manager.
| Command | Description | Example |
|---|---|---|
sudo apt update | Update package lists | Always run first |
sudo apt upgrade | Upgrade all packages | sudo apt upgrade -y |
sudo apt install package | Install package | sudo apt install vim |
sudo apt remove package | Remove package | sudo apt remove firefox |
sudo apt purge package | Remove + config files | sudo apt purge apache2 |
apt search keyword | Search packages | apt search pdf editor |
apt show package | Show package details | apt show python3 |
apt list --installed | List installed packages | apt list --installed | grep python |
sudo apt autoremove | Remove unused dependencies | Clean up orphaned packages |
sudo apt autoclean | Remove old .deb files | Free disk space |
apt combines features from apt-get and apt-cache with better output.
🔧 dpkg – Debian Package Manager
Lower-level tool for working with .deb files.
sudo dpkg -i package.deb # Install local .deb file
sudo dpkg -r package # Remove package
dpkg -l # List installed packages
dpkg -L package # List files installed by package
dpkg -S /path/to/file # Find which package owns file
sudo dpkg --configure -a # Fix interrupted installations
📱 snap / flatpak – Universal Packages
Sandboxed applications that work across distributions.
snap find searchterm # Search snaps
sudo snap install package # Install snap
snap list # List installed snaps
sudo snap refresh package # Update snap
flatpak search app # Search Flatpak
flatpak install flathub app # Install Flatpak
flatpak run app # Run Flatpak app
🔄 apt-get – Legacy Package Tool
Traditional command, still widely used in scripts.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade # Smart dependency resolution
sudo apt-get install -f # Fix broken dependencies
sudo apt-get clean # Clear package cache
10.10 Disk & Storage Commands
Monitor disk usage, partition drives, and manage filesystems.
💾 df – Disk Free Space
df -h # Human-readable sizes (GB, MB)
df -T # Show filesystem type
df -i # Inode usage (important for mail servers)
df -h --total # Show total at end
Example output: /dev/sda1 100G 45G 55G 45% /
📊 du – Disk Usage
du -sh folder/ # Total size of directory
du -h --max-depth=1 # Size of immediate subdirectories
du -ah folder/ # Show size of each file
du -sh * | sort -h # Sort by size (smallest to largest)
du -sh * | sort -rh # Sort by size (largest first)
du -ah /home 2>/dev/null | sort -rh | head -20
💽 lsblk – List Block Devices
lsblk # Tree view of disks and partitions
lsblk -f # Include filesystem info
lsblk -m # Show permissions and owner
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,LABEL # Custom columns
🔧 fdisk / parted – Partition Tools
⚡ Require sudo and careful handling.
sudo fdisk -l # List all partitions
sudo fdisk /dev/sdb # Interactive partition tool
sudo parted -l # List partitions (more detailed)
sudo parted /dev/sda print # Show partition table
🔌 mount / umount – Mount Filesystems
mount # Show all mounted filesystems
sudo mount /dev/sdb1 /mnt/usb # Mount partition to directory
sudo umount /mnt/usb # Unmount
sudo mount -t ntfs /dev/sdb1 /mnt/usb # Specify filesystem type
sudo mount -o ro /dev/sdb1 /mnt/usb # Mount read-only
🆔 blkid – Block Device Attributes
sudo blkid # Show UUID and filesystem type
blkid -s UUID /dev/sda1 # Show only UUID
UUIDs are used in /etc/fstab for persistent mounting.
🩺 fsck – Filesystem Check
⚡ Filesystem must be unmounted.
sudo fsck /dev/sda1 # Check filesystem
sudo fsck -f /dev/sda1 # Force check even if clean
sudo fsck -y /dev/sda1 # Auto-repair (yes to all)
🔄 dd – Convert & Copy
Powerful low-level copying tool.
sudo dd if=/dev/sda of=/dev/sdb bs=4M status=progress # Clone disk
sudo dd if=/dev/zero of=/tmp/test.img bs=1M count=100 # Create 100MB test file
sudo dd if=/dev/sda of=backup.img bs=4M # Backup disk to image
sudo dd if=backup.img of=/dev/sdb bs=4M # Restore from image
10.11 Compression & Archive Commands
Create and extract compressed archives.
📦 tar – Tape Archive
Most common archiving tool.
| Operation | Command | Description |
|---|---|---|
| Create | tar -czf archive.tar.gz folder/ | Create gzipped archive |
| Extract | tar -xzf archive.tar.gz | Extract gzipped archive |
| Create | tar -cjf archive.tar.bz2 folder/ | Create bzip2 archive (smaller) |
| Extract | tar -xjf archive.tar.bz2 | Extract bzip2 archive |
| List | tar -tf archive.tar.gz | View contents without extracting |
| Extract specific | tar -xzf archive.tar.gz file.txt | Extract single file |
| Verbose | tar -xzvf archive.tar.gz | Verbose output (show files) |
Options explained: c=create, x=extract, t=list, f=file, z=gzip, j=bzip2, v=verbose
🗜️ gzip / gunzip – GNU Zip
gzip file.txt # Compress (creates file.txt.gz)
gunzip file.txt.gz # Decompress
gzip -l file.txt.gz # List compression info
zcat file.txt.gz # View compressed file
📚 zip / unzip – ZIP Archives
zip archive.zip file1.txt file2.txt # Create ZIP
zip -r archive.zip folder/ # Recursive (include subfolders)
zip -e secure.zip file.txt # Encrypt with password
unzip archive.zip # Extract ZIP
unzip -l archive.zip # List contents
unzip archive.zip -d /target/folder # Extract to directory
10.12 Search & Text Processing Commands
Find files and manipulate text data.
🔎 grep – Global Regular Expression Print
Search text using patterns.
grep "error" logfile.log # Search for string
grep -i "warning" logfile.log # Case-insensitive
grep -r "TODO" ~/project/ # Recursive search
grep -v "exclude" file.txt # Invert (lines NOT matching)
grep -c "pattern" file.txt # Count matches
grep -n "error" file.txt # Show line numbers
grep -l "config" *.conf # List only filenames
grep -A2 -B2 "error" log.txt # Show 2 lines after/before
history | grep "git" - Find git commands in history
🔍 find – Search for Files
find . -name "*.txt" # Find by name
find / -type f -size +100M # Files larger than 100MB
find ~ -type d -name "Documents" # Directories named Documents
find . -mtime -7 # Modified in last 7 days
find . -user username # Owned by specific user
find . -name "*.tmp" -delete # Find and delete
find . -name "*.py" -exec python {} \; # Execute command on each
⚡ locate – Fast File Search
locate filename # Search database (instant)
sudo updatedb # Update database
locate -i "document.pdf" # Case-insensitive
vs find: locate is faster but database may be outdated.
✂️ cut – Extract Columns
cut -d: -f1 /etc/passwd # Usernames (field 1, delimiter :)
cut -c1-5 file.txt # First 5 characters each line
cut -f2,3 -d',' data.csv # Columns 2 and 3 from CSV
📊 sort / uniq – Sort & Unique
sort file.txt # Sort alphabetically
sort -n numbers.txt # Sort numerically
sort -r file.txt # Reverse order
sort -u file.txt # Sort and unique
uniq file.txt # Remove adjacent duplicates
sort file.txt | uniq -c # Count occurrences
sort file.txt | uniq -d # Show only duplicates
📝 wc – Word Count
wc file.txt # Lines, words, bytes
wc -l file.txt # Line count
wc -w file.txt # Word count
ps aux | wc -l # Count processes
🔄 sed – Stream Editor
Find and replace text.
sed 's/old/new/' file.txt # Replace first occurrence per line
sed 's/old/new/g' file.txt # Replace all occurrences
sed -i 's/old/new/g' file.txt # Edit file in-place
sed '5d' file.txt # Delete line 5
sed '2,5d' file.txt # Delete lines 2-5
sed 's/ *$//' file.txt # Remove trailing spaces
10.13 SSH & Remote Access Commands
Securely connect to remote systems and transfer files.
🔐 ssh – Secure Shell
ssh user@hostname # Connect to remote
ssh -p 2222 user@hostname # Custom port
ssh -i ~/.ssh/id_rsa user@hostname # Use specific key
ssh -J jumpuser@jumpbox user@target # Jump host (proxy)
ssh -X user@hostname # Forward X11 (GUI apps)
ssh -L 8080:localhost:80 user@hostname # Local port forwarding
🔑 ssh-keygen – Generate SSH Keys
ssh-keygen -t rsa -b 4096 # Generate RSA key (4096 bit)
ssh-keygen -t ed25519 # Modern, more secure
ssh-keygen -f ~/.ssh/customkey # Custom filename
📤 scp / rsync – File Transfer
scp file.txt user@host:/path/ # Copy to remote
scp user@host:/path/file.txt . # Copy from remote
scp -r folder/ user@host:/path/ # Copy directory
rsync -avz source/ user@host:/dest/ # Sync with compression
rsync -av --delete source/ dest/ # Mirror (delete extras)
rsync --progress largefile user@host:/path/ # Show progress
10.14 Date, Time & Scheduling Commands
Schedule tasks and manage system time.
⏰ crontab – Scheduled Tasks
Format: minute hour day month weekday command
crontab -e # Edit crontab
crontab -l # List cron jobs
crontab -r # Remove all jobs
Examples:
0 5 * * * /script.sh | Daily at 5:00 AM |
*/15 * * * * /check.sh | Every 15 minutes |
0 0 * * 1 /weekly.sh | Every Monday at midnight |
@reboot /startup.sh | Run at system boot |
⏱️ at – One-time Scheduled Task
at 14:30 # Schedule at specific time
at now + 1 hour # One hour from now
atq # List pending jobs
atrm 5 # Remove job ID 5
👁️ watch – Execute Periodically
watch -n 2 df -h # Run df -h every 2 seconds
watch -d free -h # Highlight differences
watch 'ps aux | grep python' # Monitor Python processes
⏲️ timedatectl – System Time Control
timedatectl # Show current settings
timedatectl list-timezones # List all timezones
sudo timedatectl set-timezone America/New_York # Set timezone
sudo timedatectl set-time "2025-02-11 14:30:00" # Set date/time
sudo timedatectl set-ntp yes # Enable NTP sync
10.15 Hardware & Device Commands
View hardware information and manage devices.
🖥️ lspci – PCI Devices
lspci # List PCI devices
lspci -v # Verbose
lspci -nn # Show vendor/device IDs
lspci | grep VGA # Graphics card
lspci -s 00:02.0 -v # Specific device
🔌 lsusb – USB Devices
lsusb # List USB devices
lsusb -v # Verbose
lsusb -t # Tree view
sudo lsusb -D /dev/bus/usb/001/002 # Device descriptor
🧠 lscpu – CPU Information
lscpu # CPU architecture, cores, threads
cat /proc/cpuinfo # Detailed CPU info
nproc # Number of processing units
Shows: Architecture, CPU op-modes, CPU(s), Thread(s) per core, Core(s) per socket, Model name, CPU MHz
💾 free – Memory Usage
free -h # Human-readable
free -m # In MB
free -s 2 # Repeat every 2 seconds
vmstat 1 # Virtual memory stats
🧩 lsmod / modprobe – Kernel Modules
lsmod # List loaded modules
sudo modprobe module_name # Load module
sudo modprobe -r module_name # Remove module
modinfo module_name # Show module info
sudo depmod -a # Rebuild module dependencies
📟 dmesg – Kernel Ring Buffer
dmesg # All kernel messages
dmesg | tail -20 # Recent messages
dmesg -w # Follow (live)
dmesg -l err,warn # Errors and warnings only
Useful for: Debugging hardware issues, USB device detection, driver problems.
🖥️ xrandr – Display Settings
xrandr # List displays and resolutions
xrandr --output HDMI-1 --mode 1920x1080 # Set resolution
xrandr --output eDP-1 --brightness 0.8 # Adjust brightness
xrandr --output HDMI-1 --same-as eDP-1 # Mirror displays
xrandr --output HDMI-1 --right-of eDP-1 # Extend displays
🎧 alsamixer – Sound Settings
alsamixer # Interactive sound mixer
amixer set Master 70% # Set volume from terminal
amixer set Master mute # Mute
amixer set Master unmute # Unmute
🌡️ sensors – Temperature Monitoring
sensors # CPU/GPU temperatures
sensors -f # Fahrenheit
Install: sudo apt install lm-sensors
📚 Quick Command Reference Card
Most commonly used commands for daily Linux usage:
pwd - Current locationls -la - List all filescd ~ - Go homecd .. - Up one level
cp -r - Copy directorymv - Move/renamerm -r - Remove directorymkdir -p - Create nested
cat - Display fileless - Page throughtail -f - Follow logshead -n 20 - First 20 lines
chmod 755 - Executablechmod 644 - Read/writesudo - Admin rights
ps aux - All processeshtop - Interactivekill -9 PID - Force kill
grep -r - Search textfind . -name - Find fileslocate - Fast search
⚠️ Safety Reminder
Commands to be extremely careful with:
rm -rf / - Deletes entire system
dd if=/dev/zero of=/dev/sda - Overwrites entire disk
chmod 777 / - Makes entire system world-writable
sudo without understanding what you're running
Module 10 Complete • Essential Linux Commands Reference • Bookmark this page for daily terminal work
Kali Linux Basics – Beginner & Safety Focused
This optional module introduces Kali Linux in a safe, ethical, and beginner-friendly way. You will understand what Kali Linux is, when to use it, how to run it safely using a USB pendrive, and how to avoid legal or beginner mistakes.
⚠️ This module focuses on learning, setup, and legal awareness. It does NOT teach hacking or illegal activities.
Kali Linux.1 What Is Kali Linux & Who Should Use It
Kali Linux is a Debian-based Linux distribution developed by Offensive Security. It is designed specifically for cybersecurity testing, ethical hacking, and digital forensics.
Unlike normal Linux systems (Ubuntu, Mint), Kali Linux comes pre-installed with hundreds of security-related tools. These tools are used to test systems you own or have permission to test.
🎯 Who Should Use Kali Linux?
- Cybersecurity students
- Ethical hackers (with permission)
- Network administrators
- Security researchers
🚫 Who Should NOT Use Kali Linux?
- Normal daily computer users
- Beginners without Linux knowledge
- People looking for gaming or office work
Kali Linux.2 Is Kali Linux Legal? Important Rules
Kali Linux itself is 100% legal to download, install, and use. However, how you use it determines legality.
⚖️ Legal Usage
- Practicing on your own computer
- Learning Linux commands
- Testing your own Wi-Fi or server
- Lab platforms (TryHackMe, Hack The Box)
🚨 Illegal Usage
- Hacking websites without permission
- Attacking public Wi-Fi networks
- Breaking into accounts or systems
Kali Linux.3 Ways to Use Kali Linux (USB, Install, VM)
Kali Linux can be used in multiple ways depending on your experience and system setup.
| Method | Description | Best For |
|---|---|---|
| Live USB | Run Kali from pendrive without installing | Beginners & safe testing |
| Full Installation | Install Kali on hard disk | Advanced users |
| Virtual Machine | Run Kali inside VirtualBox | Students & labs |
Kali Linux.4 Create Kali Linux Bootable Pendrive
A bootable pendrive allows you to run Kali Linux without installing it.
🧰 Requirements
- USB drive (minimum 16GB)
- Kali Linux ISO (official)
- Rufus / BalenaEtcher
⬇️ Download Kali Linux (Official ISO Files)
Kali Linux provides different download formats depending on how you want to use it. Always download Kali Linux from official sources only.
1️⃣ Kali Linux Live USB (No Installation)
This version runs directly from a pendrive without installing Kali Linux. Note: The Live ISO is officially distributed via torrent only.
- 🔗 Official page: https://www.kali.org/get-kali/
- Download type: Live → Installer → Torrent
- Recommended for: Temporary use & safe testing
2️⃣ Kali Linux Full Installation (Direct ISO)
This ISO can be downloaded directly in a browser and used to install Kali Linux or boot from USB.
- 🔗 Direct download (official): https://kali.download/base-images/kali-2025.4/kali-linux-2025.4-installer-amd64.iso
- Best for: Beginners who want a simple setup
3️⃣ Kali Linux Virtual Machine (Easiest & Safest)
Pre-built Kali Linux virtual machines are available for VirtualBox and VMware. No ISO or USB is required.
- 🔗 Official VM downloads: https://www.kali.org/get-kali/#kali-virtual-machines
- Supported: VirtualBox, VMware
- Best for: Students & lab practice
4️⃣ Download Kali Linux ISO (Direct Link for USB)
To create a Kali Linux bootable pendrive, you need the official Kali Linux Installer ISO. This file can be downloaded directly in your browser without using torrent.
-
🔗 Kali Linux Installer ISO (AMD64 – Official)
https://archive.kali.org/kali-images/kali-2025.4/kali-linux-2025.4-installer-amd64.iso
- Bootable USB (Rufus / BalenaEtcher)
- Fresh Kali Linux installation
- Learning & practice
⚙️ Steps (Using Rufus)
- Insert USB drive
- Open Rufus
- Select Kali ISO
- Partition scheme: GPT (UEFI)
- Click Start
Kali Linux.5 Boot Kali Linux & First-Time Setup
After creating the bootable USB, you can boot Kali Linux safely.
🚀 Boot Steps
- Restart PC
- Press Boot Menu key (F12 / Esc / F9)
- Select USB device
- Choose Live System
🔧 First-Time Setup
- Set keyboard layout
- Connect Wi-Fi
- Update system (optional)