Level 1
0 / 100 XP

Practice the Linux Terminal / CLI

This lab provides hands-on practice with essential Linux command-line skills. You will navigate the file system, create and manage files, work with permissions, and use text editors to modify content—building the foundational abilities needed to confidently operate and manage a Linux server environment.

Session duration: 60 minutes· Typical launch: ~1 min

Difficulty

Beginner

Lab level

Lab VMs

1

1 Linux

XP Reward

300 XP

On completion

Virtual machines

Lab VMs

Linux

Ubuntu Server 2404

Linux

Username / Password

user / password123

root / password123

Connection type

In-browser SSH / SSH

CPU / RAM

2 vCPU · 2 GiB RAM

Lab instructions

Follow the steps below to complete the lab.

In this task, you will explore the Linux file system and practice moving between directories using basic navigation commands.

  1. Use the browser based Linux or open your terminal and SSH into the Linux server.
  2. Display your current directory:
    Bash
    pwd
  3. List all files (including hidden):
    Bash
    ls -la
  4. Navigate to the following directory:
    Bash
    cd /tmp
  5. Confirm your location again using:
    Bash
    pwd
  6. Create an empty file
    Bash
    touch file.txt
  7. List all files:
    Bash
    ls -l
  8. Return to your home directory:
    Bash
    cd ~
  9. Confirm your location again using:
    Bash
    pwd
  10. Click Check step.

You will create directories and files, then manage them using essential Linux commands to build your workspace.

  1. Create a directory:
    Bash
    mkdir linux-lab
  2. Navigate into it:
    Bash
    cd linux-lab
  3. Create a file:
    Bash
    touch notes.txt
  4. Create another file with content:
    Bash
    echo "Linux is powerful" > intro.txt
  5. List files:
    Bash
    ls -l
  6. Click Check step.

This task focuses on viewing file contents and using tools to efficiently search through large files like system logs.

  1. View contents of intro.txt:
    Bash
    cat intro.txt
  2. Use less pager::
    Bash
    less /var/log/syslog
  3. Search for the word error inside the pager, type:
    Bash
    /error
  4. Exit less by pressing:
    Bash
    q
  5. Click Check step.

You will learn how to control access to files by modifying permissions and ownership, a critical skill in Linux administration.

  1. Check permissions:
    Bash
    ls -l
  2. Change permissions of notes.txt:
    Bash
    chmod 600 notes.txt
  3. Verify modified permissions:
    Bash
    ls -l notes.txt
  4. Change ownership user:
    Bash
    sudo chown $USER:$USER notes.txt
  5. Click Check step.

In this task, you will use terminal-based text editors to modify files, an essential skill for working on Linux servers.

Option A: Nano

  1. Open file:
    Bash
    nano notes.txt
  2. Add:
    Bash
    This is my Linux lab practice.
  3. Save:
    Bash
    CTRL + O → Enter
  4. Exit:
    Bash
    CTRL + X
  5. Click Check step.

Option B: Vim

  1. Open file:
    Bash
    vim notes.txt
  2. Press:
    Bash
    i
  3. Add text
    Bash
  4. Save and exit:
    Bash
    ESC → :wq
  5. Click Check step.