Welcome to the capstone lesson of Linux Command Line for DevOps! In this comprehensive guide, you will master the Unix streaming model (STDIN, STDOUT, STDERR), input/output redirection, production-grade Bash scripting with strict safety modes (set -euo pipefail), and persistent terminal sessions with tmux.
1. Standard Streams & File Descriptors
Every process started by the Linux kernel automatically opens three standard file descriptors (FD):
| Stream Name | File Descriptor | Default Source / Destination | Redirection Symbol |
|---|---|---|---|
Standard Input (stdin) | 0 | Keyboard or piped input stream | < |
Standard Output (stdout) | 1 | Terminal screen display (Standard messages) | >, >>, 1> |
Standard Error (stderr) | 2 | Terminal screen display (Error/diagnostic messages) | 2>, 2>> |
2. Redirection Mastery: >, >>, 2>, 2>&1 & /dev/null
The tee Command: Split Streams (View AND Save)
When running a deployment, you often want to watch output live in your terminal while simultaneously logging it to disk:
3. Command Chaining & Control Flow Operators
4. Production Bash Scripting: The Unofficial Strict Mode
When writing shell scripts for CI/CD pipelines, Docker entrypoints, or deployment automation, always include strict safety flags at the top of your script:
5. Terminal Multiplexing with tmux
When executing long-running database migrations, builds, or backups over SSH, an accidental WiFi disconnect or closed laptop lid will kill your shell process immediately.
tmux (Terminal Multiplexer) runs persistent shell sessions in the background on the server:
Essential tmux Commands
tmux Keyboard Shortcuts (Default Prefix: Ctrl + b)
Press Ctrl + b, release, then press:
- d โ Detach from session (leaves everything running in background on server!).
- % โ Split current window vertically into two side-by-side panes.
- " โ Split current window horizontally into top and bottom panes.
- Arrow Keys โ Switch between panes.
- c โ Create a new window (tab).
- n / p โ Next / Previous window.
- x โ Close current pane.
- [ โ Enter scroll/copy mode (use arrow keys to scroll past logs, press q to exit).
6. Top 10 DevOps Emergency Troubleshooting Recipes
Course 0 Complete! ๐
Congratulations! You have officially conquered the complete Linux Command Line for DevOps foundational curriculum:
- Lesson 1: Linux kernel architecture, FHS, and cloud/container primitives.
- Lesson 2: Terminal navigation, prompt anatomy, and Readline shortcuts.
- Lesson 3: Filesystem operations, absolute vs relative paths, and live log streaming (
tail -F). - Lesson 4: Text editing (
vim,nano), pattern matching (grep), indexing (find), and stream transformation (sed,awk). - Lesson 5: Linux security model, octal permissions (
chmod 755/600), ownership (chown), andvisudo. - Lesson 6: Process lifecycles, resource auditing (
htop), Linux signals (SIGTERM/SIGKILL), andsystemdservices. - Lesson 7: Package management across distros (
apt,dnf,apk) and secure GPG keyrings. - Lesson 8: Network interface inspection (
ip a), DNS querying (dig), sockets (ss -tulnp), and HTTP diagnostics (curl). - Lesson 9: Asymmetric SSH cryptography (Ed25519), bastion host jumping (
~/.ssh/config), and daemon hardening. - Lesson 10: Unix I/O streams, strict Bash scripting (
set -euo pipefail), andtmuxsession multiplexing.
What's Next in Your Zero-to-Hero Roadmap?
Now that your Linux foundation is rock solid, you are ready to advance through the rest of the DevOps curriculum:
- Course 1: Git & GitHub Fundamentals โ Branching strategies, atomic commits, PR code reviews, and Git Flow.
- Course 2: GitHub Actions Automation โ CI/CD pipelines, service containers, and automated deployments.
- Course 3: CI/CD Pipeline Architecture โ Deployment strategies (Blue-Green, Canary), DORA metrics, and automated rollbacks.
- Course 4: Docker Fundamentals โ Minimal multi-stage builds, layer caching, and rootless containerization.
- Course 5: Docker Compose โ Multi-service microservice orchestration, volumes, and networking.
- Course 6 & 7: Kubernetes & K3s โ Cluster administration, Pods, Deployments, Ingresses, and StatefulSets.
- Course 8: Capstone Project โ Full-stack GitOps CI/CD to live Kubernetes!