Skip to content

Linux Basics: A Practical Learning Path

Use these short lessons to learn the terminal on Debian or Ubuntu. Start at the beginning, or choose the topic you need. Each lesson explains a small set of commands and their limits.

Use Bash for the shell examples. File exercises use a new temporary directory; system checks describe the machine where you run them. A disposable VM is useful for package installation and service checks. Some containers lack a normal systemd session or restrict network and process inspection.

Suggested order

Start in the terminal

  1. Moving Around the Terminal
  2. Getting Help for Commands
  3. Reusing Bash Command History
  4. Creating, Copying, and Removing Files

Work with files and text

  1. Reading and Searching Text Files
  2. Finding Files with find
  3. Pipes and Output Redirection
  4. Sorting and Counting Text Lines
  5. Selecting Text Fields with cut
  6. Comparing Files with diff and cmp

Understand shell behavior

  1. Using Environment Variables
  2. Using Bash Exit Status

Preserve and verify files

  1. Creating Symbolic Links
  2. Creating and Extracting tar Archives
  3. Checking File Integrity with SHA-256

Inspect the system

  1. Checking System Information
  2. Checking Running Processes
  3. Checking Services and Logs
  4. Inspecting Network Addresses and Ports
  5. Managing Packages with apt

Transform text and write scripts

  1. Quoting Text and Matching Filenames
  2. Replacing Text with sed
  3. Filtering and Totaling Fields with awk
  4. Understanding File Permission Bits
  5. Writing a Small Bash Script

Practice a complete workflow

After the lessons, create a temporary directory and a small log containing repeated messages. Find matching lines, save the matches to a different file, sort and count them, and compare the result with an earlier copy. Archive the directory, extract it into a new location, then check the restored files against a checksum list saved before archiving.

Check exit statuses as well as printed output. Keep the original files and checksum list while you verify the restored copy. This connects the individual commands to one task you can repeat on your own Linux machine.

Acknowledgements

This page was created with assistance from AI.