Get comfortable in the terminal — the language every DevOps tool speaks.
Module 2 · Navigate, manage files, and control a Linux system. Free · Local.
Beginner Foundations ~45 mincd, ls, mkdir, cp, mv, rm, catchmodPrerequisites: Module 1. No prior terminal experience.
The overwhelming majority of servers, containers, and cloud machines run Linux. Docker images are Linux. Kubernetes nodes are Linux. When you SSH into a server, you land in a Linux shell. If you can drive Linux from the command line, you can operate almost any infrastructure.
The graphical desktop is friendly but slow and un-automatable. The terminal (a.k.a. shell / command line) lets you do things precisely, repeatably, and in scripts — which is the whole point of DevOps.
| Your OS | How to get a Linux shell |
|---|---|
| Linux | You already have one — open "Terminal". |
| macOS | Open "Terminal" (it's Unix; nearly identical commands). |
| Windows | Install WSL: run wsl --install in PowerShell, reboot, open "Ubuntu". |
Linux organizes everything under a single root, /. There are no "C: drives" — just one tree:
| Concept | Meaning |
|---|---|
| Absolute path | Starts from root: /home/you/notes. Works from anywhere. |
| Relative path | From where you are now: notes/app.py. |
~ | Your home directory shortcut. |
. / .. | Current directory / parent directory. |
Open your terminal and follow along. Everything here is safe and reversible.
rm is foreverThere's no recycle bin on the command line. rm -rf folder deletes a folder and everything in it, permanently. Double-check the path before you hit Enter — especially with sudo.
Run ls -l and you'll see strings like -rwxr-xr--. They describe who can do what:
read=4, write=2, execute=1. Add them per group: 7=rwx, 6=rw-, 5=r-x, 4=r--. So 755 = owner rwx, group r-x, others r-x.
On Debian/Ubuntu, apt installs software. (sudo = run as administrator.)
Navigate, manage files, set permissions, inspect processes, install software. That's the daily toolkit for working on any server or inside any container.
| Command | What it does |
|---|---|
pwd | Show current directory |
ls -la | List all files, detailed |
cd <path> | Change directory (~ home, .. up, - back) |
mkdir / touch | Make a directory / empty file |
cp / mv / rm | Copy / move-rename / delete |
cat / less / head / tail | View file contents |
grep "x" file | Search text in a file |
chmod / chown | Change permissions / ownership |
ps aux / top | List / monitor processes |
kill <PID> | Stop a process |
sudo apt install x | Install a package (Debian/Ubuntu) |
man <cmd> | Read a command's manual |
Tab auto-completes names. ↑ recalls previous commands. Ctrl+C cancels a running command. Ctrl+L (or clear) clears the screen.
| Message | Meaning & fix |
|---|---|
No such file or directory | Wrong path or typo. Check with ls and pwd. |
Permission denied | You lack rights — try sudo, or fix with chmod. |
command not found | Not installed or misspelled. Install it with apt. |
Stuck in a pager (less/man) | Press q to quit. |
| Terminal frozen | Press Ctrl+C to cancel the current command. |
project/src and project/docs in one command (hint: mkdir -p).ls -l.grep to find every line containing "error" in /var/log/syslog (or any log file).ls (man ls) and find the flag that sorts by modification time.Move around the Linux filesystem, manage files, control permissions, inspect processes, and install software — all from the terminal. This is the bedrock skill for everything that follows.
Next up: Module 3 — Bash Scripting, where you'll chain these commands into reusable scripts that automate the boring stuff.