Press ESC to close Close ✕

Linux - Terminal

01 // Terminal basics

What the Linux terminal is, why it matters, and how the pieces fit together.

The Linux terminal is the text-based interface that lets you work directly with the operating system. It is fast, scriptable, precise, and available on almost every Linux distribution. Terminal skills matter because many server, cloud, DevOps, troubleshooting, automation, and recovery tasks are still easier or only possible from the command line.

Terminal usually means the application window. Shell means the program reading your commands, such as Bash, Zsh, or Fish. Bash is one of the most common Linux shells. Command line is the general text interface where you type commands.

Ubuntu

Press Ctrl + Alt + T, or search for Terminal from the application menu.

Fedora

Open the application overview and search for Terminal or Console.

Debian

Use the application launcher or keyboard shortcut if your desktop environment supports it.

Arch & Derivatives

Launch your installed terminal emulator from the desktop menu or run one from a TTY session.

02 // Safe Practice Sandbox

Ubuntu Client Simulator with Real-Time Educational Output

This sandbox runs entirely inside your browser using our embedded JavaScript engine. It never executes real commands on your device or server. Click any quick-command pill below or type commands directly into the terminal prompt!

Quick Run:
bash - 80x24 // ~/linux-lab
STATUS: ONLINE // CLIENT_SANDBOX
danial@linux:~/linux-lab$ pwd /home/danial/linux-lab danial@linux:~/linux-lab$ ls -lah total 24K drwxr-xr-x 4 danial danial 4.0K Jul 25 10:00 . drwxr-xr-x 8 danial danial 4.0K Jul 25 09:30 .. drwxr-xr-x 2 danial danial 4.0K Jul 25 10:05 notes -rw-r--r-- 1 danial danial 128 Jul 25 10:01 a.txt -rw-r--r-- 1 danial danial 1.2K Jul 25 10:02 server.log -rwxr-xr-x 1 danial danial 450 Jul 25 10:03 backup.sh
danial@linux:~/linux-lab$
03 // Command Explorer

Search, filter, and safely practice 25+ essential Linux commands.

Filter by category using our high-speed sub-menu bar below or search by keyword. Click the checkbox as you learn each command to track your mastery in real-time!

Showing 25 commands
Mastery Progress: 0 / 25
04 // Pipes and redirection

How Linux commands become powerful when you combine them.

| Pipe

Sends output of one command into another. Example: ps aux | grep nginx.

> and >>

Write output to a file or append to it. Example: echo "done" >> log.txt.

< and 2>

< feeds file as input. 2> redirects errors. Example: grep root /etc/passwd 2> err.txt.

&& and ||

Run next command only if previous succeeds (`&&`) or fails (`||`). Example: mkdir test && cd test.

Wildcards

* matches many chars, ? one char, and [] a set/range. Example: ls *.log.

Quoting & Escaping

Single quotes for literal text, double quotes for variables, backslash to escape. Example: echo "$HOME".

05 // Keyboard shortcuts

15 shortcuts that save hours in every terminal session.

Ctrl + C

Stop / terminate the current running command immediately.

Ctrl + L

Clear the terminal screen (equivalent to `clear`).

Ctrl + A

Move cursor to the beginning of the command line.

Ctrl + E

Move cursor to the end of the command line.

Ctrl + U

Delete from cursor back to the start of the line.

Ctrl + K

Delete from cursor to the end of the line.

Ctrl + W

Delete the previous word before the cursor.

Ctrl + R

Search command history interactively backward.

Ctrl + D

Exit current shell session or send EOF signal.

Ctrl + Z

Suspend current foreground process to background.

Tab

Autocomplete commands, directory paths, and filenames.

Up Arrow

Recall previous commands from your session history.

!!

Repeat the last executed command (try `sudo !!`).

Alt + .

Insert the last argument from the previous command.

Ctrl + Shift + T

Open a new terminal tab in most desktop terminal apps.

06 // Useful aliases & combos

Small Bash aliases & 10 practical command chains worth learning early.

  • alias ll='ls -lah' — detailed list including hidden files
  • alias gs='git status' — quick git repository check
  • alias ..='cd ..' — move up one directory quickly
  • alias ports='ss -tulpn' — view active listening network ports
  • alias hist='history | tail -n 25' — view last 25 executed commands

10 Practical Command Chains:

  1. mkdir -p ~/linux-lab/logs && cd ~/linux-lab
  2. find . -type f | wc -l — count total files in folder
  3. ps aux | grep ssh — check if ssh service is running
  4. journalctl -u ssh --since today — view today's ssh logs
  5. df -h | sort — sort disk space usage by filesystem
  6. du -sh ./* | sort -h — find largest folders in current dir
  7. ip addr show | grep inet — display active IP addresses
  8. history | tail -n 20 | tee recent-history.txt — save history to file
  9. find ~/linux-lab -name "*.log" -print0 | xargs -0 grep -n error
  10. tar -czf backup.tar.gz ~/linux-lab && ls -lh backup.tar.gz
07 // Interactive Lab Exercises

10 beginner exercises to build terminal muscle memory.

Try solving these in your own terminal or click the button to test the solution in our sandbox above!

01. Create a lab folder called ~/linux-lab/notes and move into it.
mkdir -p ~/linux-lab/notes && cd ~/linux-lab/notes
02. Create three empty files named a.txt, b.txt, and c.txt.
touch a.txt b.txt c.txt
03. List files with human-readable sizes and hidden files.
ls -lah
04. Write the text Hello Linux into a.txt.
echo "Hello Linux" > a.txt
05. Display only the first line of a.txt.
head -n 1 a.txt
06. Copy a.txt to backup-a.txt.
cp a.txt backup-a.txt
07. Search for the word Hello inside the current directory.
grep -R "Hello" .
08. Show disk usage for the current folder in a compact form.
du -sh .
09. Find all .txt files under ~/linux-lab.
find ~/linux-lab -type f -name "*.txt"
10. Create a compressed archive of ~/linux-lab.
tar -czf linux-lab.tar.gz ~/linux-lab
08 // 7-day roadmap & FAQ

A one-week path for building real terminal confidence.

  1. Day 1 (Navigation): Learn pwd, ls, cd, and tab completion.
  2. Day 2 (File Ops): Practice mkdir, touch, cp, mv, and safe rm examples.
  3. Day 3 (Inspection): Read files with cat, less, head, and tail.
  4. Day 4 (Search): Search with grep, find, sort, uniq, and wc.
  5. Day 5 (Permissions): Understand permissions using chmod, chown, umask, and sudo.
  6. Day 6 (System State): Inspect system state with ps, top, df, du, free, and ip.
  7. Day 7 (DevOps Core): Practice ssh, rsync, tar, systemctl, and journalctl.
Frequently Asked Questions

Common Linux command questions.

What should I learn first in the Linux terminal?

Start with navigation (`pwd`, `ls`, `cd`), file work (`mkdir`, `cp`, `mv`), reading files (`cat`, `less`), search (`grep`), and permissions (`chmod`). Those skills unlock 90% of daily admin and DevOps workflows.

What is the safest way to practice risky commands?

Create a dedicated sandbox folder such as ~/linux-lab/, verify paths with pwd and ls, and test on throwaway files before touching real data or system directories.

Why is man still so important?

Because it explains what a command does, which flags change behavior, and what to expect on your specific distribution without needing an internet connection.

Why does the same package command change between distributions?

Package managers are distribution-specific. Ubuntu and Debian commonly use apt, Fedora uses dnf, Arch uses pacman, and many cloud apps also ship through docker, snap, or flatpak.