Beginner DevOps
Terminal & Command Line
Shell commands, scripting, and automation basics.
Mastering the Terminal
The command line is essential for development, automation, and server management.
Navigation
pwd # Print working directory
ls -la # List files (detailed)
cd path # Change directory
cd .. # Go up one level
cd ~ # Go to homeFile Operations
touch file # Create file
mkdir dir # Create directory
cp src dst # Copy
mv src dst # Move/rename
rm file # Remove file
rm -rf dir # Remove directoryText Processing
cat file # View file
head -n 10 # First 10 lines
tail -f log # Follow log file
grep pattern # Search text
wc -l # Count linesPiping & Redirection
cmd1 | cmd2 # Pipe output
cmd > file # Redirect to file
cmd >> file # Append to file
cmd 2>&1 # Redirect stderrShell Scripting Basics
#!/bin/bash
for file in *.txt; do
echo "Processing $file"
done