Linux Essentials Labs

Master Linux fundamentals with hands-on labs aligned with official certification objectives. These labs cover command line, file management, user administration, and system monitoring.

These Labs Cover All Major Linux Certifications

LPI Linux Essentials CompTIA Linux+ (XK0-006) LPIC-1 (101 & 102) LPIC-2 (201 & 202) LPIC-3 (300 / 303 / 305 / 306)
RHCSA (EX200) RHCE (EX294) RHCA LFCS LFCE LFCA CKA CKAD CKS

Linux Essentials Labs - Module 1

Begin your Linux journey with fundamental skills: command line, file management, users & permissions, and system monitoring.

Lab 1: Command Line Basics & File Management
Beginner / Terminal + GUI
Scenario: Junior Admin File Organization
You have just started as a junior Linux administrator at TechStart Inc. Your first task is to organize the company's project files, create a proper directory structure, manage files using the command line, and create a compressed archive for backup. You'll also learn to search for files and process text data.

Learning Objectives:

LPI Linux Essentials - Topics 2 & 3
  • Command Line Navigation: Use ls, cd, pwd to navigate the filesystem
  • File Management: Create, copy, move, and remove files and directories
  • Archiving: Create tar archives with gzip compression
  • Text Processing: Search with grep, use pipes and redirection

📋 Step-by-Step Instructions

  1. Step 1: Explore Your Current Location
    🎯 Goal: Understand where you are in the filesystem and list files

    📝 What is pwd?
    pwd (print working directory) shows your current location in the filesystem. Think of it like looking at the address bar in a file explorer.

    💻 Print current directory:
    pwd

    💻 List files with details:
    ls -la

    🔍 What to look for:
    -l shows long format (permissions, owner, size, date)
    -a shows hidden files (starting with a dot)
    • The first character shows type: d = directory, - = file
    💡 Tip: You can combine flags: ls -la is the same as ls -l -a. The order doesn't matter!
    📖 Hint: If you get lost, type pwd to see where you are. Type help to see all available commands.
  2. Step 2: Create Project Directory Structure
    🎯 Goal: Build an organized project directory tree

    📝 What is mkdir -p?
    mkdir creates directories. The -p flag creates parent directories as needed. Without it, you'd get an error if the parent doesn't exist.

    💻 Create project directories:
    mkdir -p projects/webapp/src
    mkdir -p projects/webapp/docs
    mkdir -p projects/webapp/tests

    💻 Verify with ls:
    ls -R projects

    🔍 What happens:
    • Creates projects/webapp/src/, docs/, tests/
    -R lists recursively so you can see the full tree
    💡 Tip: Always use -p with mkdir when creating nested paths. It prevents errors and is safe to run again.
  3. Step 3: Create and Manage Files
    🎯 Goal: Create files, copy them, and move them into proper directories

    📝 touch vs cp vs mv:
    touch creates empty files (or updates timestamp if exists)
    cp copies files — original stays, copy is created
    mv moves files — original is gone, appears in new location


    💻 Create files:
    touch projects/webapp/src/index.html
    touch projects/webapp/src/style.css

    💻 Copy a file to docs:
    cp projects/webapp/src/index.html projects/webapp/docs/index-backup.html

    💻 Move a config into place:
    touch config.txt
    mv config.txt projects/webapp/
    💡 Tip: Use tab key to autocomplete paths. Check the GUI file browser panel to see your changes live!
    ⚠️ Caution: mv overwrites without warning if destination file exists. In production, use mv -i for interactive prompts!
  4. Step 4: Archive and Compress Files
    🎯 Goal: Create a compressed tar archive of the project for backup

    📝 What is tar?
    tar (tape archive) bundles multiple files into one archive. Adding -z compresses with gzip. Think of it as creating a .zip file in Linux.

    💻 Create compressed archive:
    tar -czvf projects-backup.tar.gz projects/

    🔍 Flag breakdown:
    -c = create new archive
    -z = compress with gzip
    -v = verbose (show files being archived)
    -f = specify filename
    💡 Exam Tip: Remember tar flags: create, extract, table of contents. tar -xzvf to extract, tar -tzvf to list contents!
  5. Step 5: Search and Process Text
    🎯 Goal: Use grep and pipes to search and filter data

    📝 What is grep?
    grep searches for text patterns in files. Combined with pipes (|), you can chain commands to filter and process data — this is the power of Linux!

    💻 Search for a pattern:
    grep -r "html" projects/

    💻 Use pipe to count files:
    ls -la projects/webapp/src/ | wc -l

    💻 Redirect output to a file:
    ls -R projects/ > file-list.txt
    💡 Tip: Pipe (|) sends the output of one command as input to another. Redirect (>) sends output to a file instead of the screen.
  6. Step 6: Clean Up and Verify
    🎯 Goal: Remove temporary files and verify your work

    💻 Remove the temp file list:
    rm file-list.txt

    💻 Verify archive exists:
    ls -lh projects-backup.tar.gz

    💻 List archive contents:
    tar -tzvf projects-backup.tar.gz
    ⚠️ Warning: rm is permanent in Linux — there is no recycle bin! In production, use rm -i for confirmation prompts.
    🎓 Checkpoint: You now know the core skills: navigating, creating, copying, moving, archiving, searching. These are used daily by every Linux admin!

Linux Terminal

Terminal
File Browser
Activity Log
student@linux-lab:~$
File System Browser
~ (home)
Disk Usage
Total Space50 GB
Used12.3 GB
Available37.7 GB
Recent Activity
[--:--:--]Lab session started. Ready for commands.
Progress: 0/6 tasks completed
Score: 0/100
🎉 After Completing All Steps:

1. Click "Validate Configuration" to see which tasks are complete and which remain.
2. Click "View File Tree" to see the directory structure you built as a diagram.
💡 Tip: Check the Activity Log tab to review all commands you ran with timestamps!
Lab 2: User & Group Management
Beginner / Terminal + GUI
Scenario: Onboarding New Team Members
The HR department has sent you a list of new employees to onboard. You need to create their user accounts, assign them to proper groups (developers, managers), set passwords, and configure appropriate file permissions on shared project directories.

Learning Objectives:

LPI Linux Essentials - Topic 5
  • User Management: Create users with useradd and set passwords
  • Group Management: Create groups and assign users to groups
  • Permissions: Use chmod and chown to control file access
  • Security: Understand root vs standard users and sudo

📋 Step-by-Step Instructions

  1. Step 1: Create User Groups
    🎯 Goal: Create department groups for access control

    📝 What are groups?
    Groups let you manage permissions for multiple users at once. Instead of setting permissions for each person, assign them to a group and set permissions on the group.

    💻 Create the developers group:
    sudo groupadd developers

    💻 Create the managers group:
    sudo groupadd managers

    💻 Verify groups were created:
    cat /etc/group | grep -E "developers|managers"
    💡 Tip: sudo runs commands as root (administrator). User/group management always requires root privileges.
    📖 Hint: Check the GUI "User Manager" tab to see groups appear in real time as you create them!
  2. Step 2: Create User Accounts
    🎯 Goal: Create accounts for new employees with home directories

    📝 useradd flags:
    -m creates a home directory (/home/username)
    -G assigns supplementary groups
    -s sets the login shell


    💻 Create developer accounts:
    sudo useradd -m -G developers -s /bin/bash jsmith
    sudo useradd -m -G developers -s /bin/bash alee

    💻 Create manager account:
    sudo useradd -m -G managers -s /bin/bash mwilson
    💡 Tip: Always use -m to create a home directory. Without it, the user has no personal space for files and settings!
  3. Step 3: Set User Passwords
    🎯 Goal: Set initial passwords for the new accounts

    📝 Why passwords matter:
    Without a password, users can't log in. The passwd command sets or changes user passwords. Passwords are stored encrypted in /etc/shadow (never in plain text!).

    💻 Set passwords (type exactly):
    sudo passwd jsmith
    sudo passwd alee
    sudo passwd mwilson
    💡 Tip: In this lab, passwords are auto-set. In real life, use strong passwords (12+ chars, mixed case, numbers, symbols)!
    ⚠️ Security: Never store passwords in plain text. Linux uses /etc/shadow with salted hashes. Only root can read this file!
  4. Step 4: Create Shared Directory with Group Permissions
    🎯 Goal: Set up a shared workspace that only developers can access

    💻 Create shared directory:
    sudo mkdir /opt/dev-workspace

    💻 Set group ownership:
    sudo chown root:developers /opt/dev-workspace

    💻 Set permissions (rwxrwx---):
    sudo chmod 770 /opt/dev-workspace

    🔍 Permission breakdown:
    7 = rwx (read+write+execute) for owner (root)
    7 = rwx for group (developers)
    0 = no access for others
    💡 Tip: Watch the Permissions Visualizer in the GUI panel — it shows permissions updating in real-time!
  5. Step 5: Verify User Information
    🎯 Goal: Confirm all users and groups are configured correctly

    💻 Check user details:
    id jsmith
    id mwilson

    💻 List all users:
    cat /etc/passwd | tail -5

    🔍 What id shows:
    uid (user ID), gid (primary group ID), and all supplementary groups the user belongs to.
    💡 Exam Tip: The id command is the fastest way to check user group membership. It shows UID, GID, and all groups.
  6. Step 6: Test Access Control
    🎯 Goal: Verify that permissions work correctly

    💻 Check directory permissions:
    ls -la /opt/dev-workspace

    💻 Verify who can access:
    sudo -u jsmith ls /opt/dev-workspace

    💻 Verify non-member is denied:
    sudo -u mwilson ls /opt/dev-workspace
    🎓 Checkpoint: jsmith (developer) should have access, mwilson (manager only) should be denied. This is Linux access control in action!

Linux Terminal

Terminal
User Manager
Activity Log
root@linux-lab:~#
Users
root (UID 0)Admin
student (UID 1000)Regular
Groups
rootGID 0
studentGID 1000
Permissions Visualizer
Create files and directories to see permissions here
Recent Activity
[--:--:--]Lab session started. Ready for commands.
Progress: 0/6 tasks completed
Score: 0/100
🎉 After Completing All Steps:

1. Click "Validate Configuration" to check users, groups, and permissions.
2. Check the User Manager tab to see all users and groups visualized.
💡 Tip: The Permissions Visualizer shows rwx values graphically!
Lab 3: System Monitoring & Networking
Beginner / Terminal + Dashboard
Scenario: Server Health Check
The ops team has reported a slow server. You need to investigate by checking running processes, memory usage, disk space, and network connectivity. Use system monitoring tools to identify issues and verify the server can communicate with external services.

Learning Objectives:

LPI Linux Essentials - Topic 4
  • Process Monitoring: Use ps, top, and free to check system resources
  • System Logs: Read dmesg and syslog for system messages
  • Disk Space: Check storage usage with df and du
  • Networking: Test connectivity with ping, check config with ip addr

📋 Step-by-Step Instructions

  1. Step 1: Check Running Processes
    🎯 Goal: Identify what's running on the system and which processes use the most resources

    📝 What is ps?
    ps (process status) shows running processes. aux flags show ALL processes with details. Think of it as Task Manager in Windows.

    💻 List all processes:
    ps aux

    💻 Find high-CPU processes:
    ps aux --sort=-%cpu | head -10

    🔍 What to look for:
    • %CPU — processes using excessive CPU
    • %MEM — processes consuming memory
    • STAT — process state (R=running, S=sleeping, Z=zombie)
    💡 Tip: Check the System Dashboard tab to see a live graphical view of processes, CPU, and memory!
  2. Step 2: Check Memory and System Load
    🎯 Goal: Determine if the server is running out of memory

    💻 Check memory usage:
    free -h

    💻 Check system uptime and load:
    uptime

    🔍 Reading free output:
    -h = human-readable (GB/MB instead of bytes)
    • "available" is what matters — it's free + reclaimable cache
    • If available is very low, the server needs more RAM
    💡 Tip: Don't panic if "free" memory is low. Linux uses spare RAM for disk caching. Check "available" instead!
  3. Step 3: Check Disk Usage
    🎯 Goal: Find if disk space is running low

    💻 Check filesystem usage:
    df -h

    💻 Find large directories:
    du -sh /var/log

    🔍 df vs du:
    df = disk free (filesystem-level view, shows mount points)
    du = disk usage (directory-level, shows folder sizes)
    ⚠️ Warning: If any filesystem hits 100%, the server can crash or become unresponsive. Keep usage below 85%!
  4. Step 4: Read System Logs
    🎯 Goal: Check system messages for errors and warnings

    💻 View kernel messages:
    dmesg | tail -20

    💻 Check system log:
    cat /var/log/syslog | tail -10

    🔍 What to look for:
    • Error messages (hardware failures, driver issues)
    • Warnings about resources (low memory, disk full)
    • Network interface up/down events
    💡 Tip: dmesg shows kernel ring buffer (hardware, drivers). /var/log/syslog shows application and system service messages.
  5. Step 5: Check Network Configuration
    🎯 Goal: Verify network interface configuration

    💻 Show IP addresses:
    ip addr show

    💻 Check routing table:
    ip route show

    💻 Check DNS configuration:
    cat /etc/resolv.conf
    💡 Tip: ip addr show replaced the older ifconfig command. Look for inet lines showing IPv4 addresses.
  6. Step 6: Test Network Connectivity
    🎯 Goal: Verify the server can reach external services

    💻 Ping the gateway:
    ping -c 4 192.168.1.1

    💻 Check open connections:
    ss -tuln

    🔍 Understanding ss output:
    -t = TCP, -u = UDP
    -l = listening ports, -n = show port numbers (not names)
    • Common ports: 22=SSH, 80=HTTP, 443=HTTPS
    🎓 Checkpoint: You can now diagnose a slow server: check processes (ps), memory (free), disk (df), logs (dmesg), and network (ping, ss). These are the 5 pillars of Linux troubleshooting!

Linux Terminal

Terminal
System Dashboard
Activity Log
admin@server01:~$
CPU & Memory
CPU Usage73%
Memory Used5.2 GB / 8 GB
Load Average2.45, 1.89, 1.56
Disk Usage
/ (root)42%
/var78%
Network
eth0 IP192.168.1.50
Gateway192.168.1.1
DNS8.8.8.8
StatusConnected
Top Processes
PIDCOMMAND%CPU%MEM
1284apache234.28.1
2156mysql18.522.3
892node12.15.7
3401cron0.20.1
Recent Activity
[--:--:--]Lab session started. Ready for commands.
Progress: 0/6 tasks completed
Score: 0/100
🎉 After Completing All Steps:

1. Click "Validate Configuration" to see your completion status and remaining items.
2. Check the System Dashboard tab for live-updating server stats.
💡 Tip: The dashboard automatically updates as you run monitoring commands!