Linux
The terminal habits that separate working engineers from people who tab into the AWS Console. Navigate, observe, and compose by the end.
beginner55 labs
By the end you'll be able to
- Navigate any unfamiliar Linux box without panic
- Read what a process is doing without restarting it
- Pipe small tools together to answer real questions
- Manage permissions and find files without reaching for sudo
Labs
- 01StartWhat is LinuxBefore you type a single command, understand what Linux is and why DevOps engineers use it every day.5 min
- 02StartWhat is a terminalUnderstand what the black rectangle full of text actually is, and why engineers prefer it to clicking icons.5 min
- 03StartRead the promptDecode `learner@dlth:~$`. Each piece tells you something useful before you type a single command.5 min
- 04StartThe filesystem is a treeLinux organises every file in a single tree starting at `/`. See it once and the layout makes sense forever.5 min
- 05StartWhat a command really isA command is just a program the shell finds on a list of folders called PATH. Once you see that, the magic dissolves.5 min
- 06StartWhere am I (pwd)Print the absolute path of the directory the shell is in. The first thing to ask before you do anything else.3 min
- 07StartList files (ls, ls -l, ls -a)Three flavours of ls. Bare for a quick look, `-l` for details, `-a` for hidden files.5 min
- 08StartMove around (cd)Walk between directories with cd, climb with cd .., go home with cd ~.5 min
- 09StartHidden files (the dot convention)Filenames that start with a dot are hidden from default `ls`. Reveal them with `ls -a`. The convention covers `.bashrc`, `.ssh/`, `.git/`, `.env`.5 min
- 10StartWhat kind of file is this? (file)Use `file` to identify what something actually is by inspecting magic bytes. Saves you from `cat`-ing a binary and garbling your terminal.5 min
- 11StartRead files (cat, head, tail, less)Four ways to read a file. Pick the one that matches the file's size and your intent.6 min
- 12StartRead big files (less + search)`less` is a pager. Open a long file, scroll, search forward with `/`, jump matches with `n`, quit with `q`. Stops `cat` from flooding your terminal.5 min
- 13StartFollow a log (tail -f)Watch a log file as new lines arrive. The `-f` flag keeps the file open and streams updates in real time.5 min
- 14StartMake folders (mkdir)Create directories. Plain mkdir for one. mkdir -p for nested paths in a single shot.4 min
- 15StartMake files (touch)Create empty files. The simplest building block for everything else you'll do with text on Linux.3 min
- 16StartWrite to a file with > and >>Two operators that write text to files without opening an editor. The fastest way to script file content.4 min
- 17StartFind files (find)Locate files anywhere on disk by name, type, or modification time. The 'where did I put that' command.5 min
- 18StartFind by time and sizeUse `find -mtime` to filter by age and `-size` to filter by file size. The two tests that drive most disk-cleanup scripts.7 min
- 19StartSearch inside files (grep)find locates files; grep looks INSIDE them. Plain grep for one file, grep -r for a tree.6 min
- 20Startgrep with context (-A -B -C, -i)Show lines around a match with -A and -B. Match case-insensitively with -i. The flags that turn grep from finder into reader.5 min
- 21StartEdit with nanoNano is the friendly terminal editor. Type, Ctrl+O to save, Ctrl+X to exit. That's the whole story.5 min
- 22StartVim survival modeJust enough vim to open a file, edit it, save, and quit. Not a vim course, a not-getting-stuck course.6 min
- 23StartCopy and move (cp, mv)Duplicate a file with cp. Rename or relocate one with mv. The first leaves the source; the second doesn't.5 min
- 24StartDelete safely (rm)Remove files with rm. Understand what -r and -f mean. The single command engineers most regret typing.6 min
- 25StartArchive and compress (tar + gzip)Bundle a directory into a single `.tar.gz` file, then extract it back. The standard way to ship code, configs, and backups on Linux.6 min
- 26StartRead file permissions (ls -l decoded)The 10-character string at the start of `ls -l` tells you who can do what. Learn to read it before you change it.5 min
- 27Startchmod numeric (644, 755, 600)Three octal digits. Owner, group, others. The fastest way to set permissions exactly the way you want.5 min
- 28Startchmod symbolic (u+x, g-w)Symbolic mode uses letters: u (user), g (group), o (others), + (add), - (remove). When you only want to flip one bit, this is faster than numeric.5 min
- 29StartWho owns this file? (chown + chgrp)Read user and group ownership from `ls -l`, try `chown` without root to see why it fails, and use `chgrp` to switch a file's group.6 min
- 30StartMake a script executable and run itWrite a tiny shell script, set the execute bit with chmod +x, and run it. The full lifecycle of a Unix program from your fingertips.6 min
- 31StartList running processes (ps aux)Every process on the box, with its user, CPU, memory, and command line. The first thing to run when something feels wrong.5 min
- 32StartBackground jobs (&, jobs, fg)Send a long-running command to the background with &, list it with jobs, bring it back with fg.5 min
- 33StartSurvive logout (nohup + disown)Start a background job that survives the shell closing. Use `nohup` to ignore SIGHUP, and `disown` to drop a running job from the shell's job table.7 min
- 34StartStop a process (kill, kill -9)Send a signal with kill. Default is TERM (polite). Escalate to KILL with -9 when the process ignores you.5 min
- 35StartSee the process tree (ps -ef --forest)Every process has a parent. The tree view shows you who started what.5 min
- 36Startstdin, stdout, stderrEvery program has three streams. Once you can name them, redirection and pipes stop being magic.5 min
- 37StartRedirection (>, >>, 2>&1)Stream output to files. > overwrites, >> appends, 2>&1 captures errors.4 min
- 38StartPipes (|)Send the output of one command as the input of the next. The vertical bar that turns Unix into Lego.4 min
- 39StartPipe through grepThe classic 'cat file | grep pattern' combo. The shape of every Unix one-liner you'll write for the rest of your career.4 min
- 40StartCombine pipes and redirectsPipe through wc, redirect the count to a file. Two operators stacked, one of the most common shell shapes.4 min
- 41StartCount, sort, and dedupe (wc, sort, uniq)Three commands that turn pipes into real analysis. Count lines. Sort them. Deduplicate. The 'top N requesters' one-liner is built from these.6 min
- 42StartPull columns and translate (cut, tr)cut extracts specific columns or characters. tr translates one set of characters into another. Two surgical tools for cleaning data.5 min
- 43StartStream edit (sed)Find-and-replace text without opening an editor. The most common shell one-liner pattern of all time.6 min
- 44StartProcess columns with awkawk treats each line as a row of fields. Pull columns, do math, filter rows. The Unix one-liner secret weapon.6 min
- 45StartSplit output (tee)Send the same output to a file AND to the next pipe stage. Useful for logging mid-pipeline and for sudo-write tricks.5 min
- 46StartDisk and memory (df, du, free)Three commands answer 'is this box healthy.' df for filesystems, du for what's eating disk, free for memory.5 min
- 47StartSystem info (uname, uptime, who)Three commands tell you what kernel you're on, how long the box has been up, and who else is logged in.4 min
- 48StartEnvironment ($PATH, env, .bashrc)Environment variables are how processes inherit context. $PATH tells the shell where to find commands. env shows them all.5 min
- 49StartPersist variables (export + .bashrc)A plain assignment lives in the current shell only. export hands a variable down to child processes. ~/.bashrc is what makes it survive a new shell.5 min
- 50StartQuoting (single, double, backtick)Single quotes are literal. Double quotes expand $VAR and $(cmd). Backticks run a command and substitute its output. Most bash bugs in the wild are wrong-quote bugs.6 min
- 51StartGlobs (*, ?, [abc])Glob patterns are expanded by the shell before the command runs. The kernel never sees a glob. Quoting disables it.6 min
- 52StartVariable expansion patternsBash has a small set of expansion forms that show up in every script. Defaults, suffix and prefix trimming, last exit code, and the current PID.7 min
- 53StartDiagnose a permission deniedA script refuses to run with permission denied. Read the permission bits to find why, fix the one that is wrong, and make the script produce its output.12 min
- 54StartFind and stop a runaway processA background job is filling a log file and will not stop on its own. Find which process is writing it, identify it, and kill it.14 min
- 55StartCapstone, turn a log into a reportAn open-ended problem with no prescribed pipeline. Read an access log, count requests and errors per client IP, and write a sorted CSV. Any approach that produces the right report passes, the checks grade the output, not the keystrokes.25 min