Linux Fundamentals

Lesson 5 of 7

Local CLI

Everything so far works the same in a browser-based sandbox. Real systems work involves your own machine, so this lesson is a guided tour of what to set up locally.

A real terminal, and WSL on Windows

macOS and Linux both ship with a real terminal out of the box. On Windows, install WSL (Windows Subsystem for Linux), which runs a genuine Linux environment alongside Windows:

wsl --install

This gets you a real bash shell, real Linux filesystem semantics, and every command in this course working exactly as shown, rather than an approximation.

Manual pages

Every standard command ships with a full manual, more detailed than --help:

man ls
# space/f = next page, b = previous page, q = quit

Interactive pagers

Commands like man, and tools like less, are pagers, they show output one screen at a time instead of dumping it all at once:

cat huge_log.txt | less   # scroll through with arrow keys, q to quit

Processes

Every running program is a process, with a unique process ID (PID):

ps aux            # list running processes
top                # live, updating view of processes and resource use
kill 4821          # ask a process to stop, by PID

Users, root, and sudo

Linux is multi-user by design. Regular users can't modify system files or other users' data, that requires the root user, the one account with unrestricted access:

whoami             # your current user
sudo apt update    # run one command AS root, temporarily, with a password prompt

sudo ("superuser do") is how you borrow root's power for a single command without permanently logging in as root, which is exactly the safer, auditable model almost every real system uses.

WARNING

Running everyday commands as root "just to avoid permission errors" is a common beginner habit and a real safety risk, a typo in a root shell can damage the whole system. Use sudo per-command instead.

📝 Local CLI Quiz

Passing score: 70%
  1. 1.What does WSL let you do on Windows?

  2. 2.sudo permanently logs you in as the root user for the rest of your session.

  3. 3.The one Linux account with unrestricted access to modify any file on the system is called ____.