The Linux Command Line
Work on any server with just a keyboard — files, permissions, processes, pipes, SSH and shell scripts.
- Module 6 of 8
- Beginner
- 12 chapters
- 1 h 10 min
Servers have no mouse. Fluency on the command line is how you deploy, debug and fix production when it breaks late at night.
What you will be able to do
- Move around and manage files with confidence
- Read and change permissions
- Combine tools with pipes and write small shell scripts
- Find misbehaving processes and work on remote machines over SSH
Chapters
1. The Terminal and the ShellThe terminal is the chat window: the app that shows text and sends your keystrokes (Terminal or iTerm2 on Mac).5 min2. Moving AroundThe room you're in is the current working directory.5 min3. Working With FilesEverything you'd do with paper documents: read one, flip through it, glance at the last page, make a copy, move it to4 min4. PermissionsEvery file has an owner (a user) and a group (a named set of users).5 min5. Pipes and Redirection> truncates the file before the command even runs. sort data.txt > data.txt gives you an empty file: the5 min6. Text-Processing Toolsuniq without sort first gives wrong counts, because it only merges adjacent duplicates.7 min7. Processes and JobsThe hotel manager's register of guests from 02operatingsystems.md — now you get to read it, and ask guests to leave.3 min8. Environment Variables and PATHAn environment variable is a named piece of text every process carries and passes on to the processes it starts4 min9. Shell ScriptsAlways start scripts with set -euo pipefail. Without it, a failed cd is ignored and the following commands run4 min10. SSH and Remote WorkSSH (Secure Shell) gives you an encrypted terminal on a remote machine. It uses TCP port 224 min11. Packages, Services and Schedulescron runs with a minimal environment — a short PATH and none of your .zshrc variables. Scripts that work in your5 min12. The Incident Toolkit: Solving the 11 p.m. OutageBack to Part 0. StudyBuddy is down. Here's the calm, ordered way through it, using only this file's commands.4 min
Extras
The Whole StoryThe whole module retold as one story — no new facts, a fast revision of The Linux Command Line.RevisionInterview QuestionsReal interview questions on The Linux Command Line, answered the way you would say them out loud.Interview prepQuick ReferenceGlossary and cheat sheet for The Linux Command Line — the page to reread before an interview.Reference