Linux Commands Every Developer Needs

matt
Matthew Gros · Dec 20, 2025

TLDR

Master grep, find, awk, sed, and ssh. Learn to pipe commands together. Use man pages.

Linux Commands Every Developer Needs

Essential Commands

These will cover 90% of what you need.

File Operations

# List files
ls -la              # Long format, show hidden

# Navigate
cd /var/www         # Absolute path
cd ../              # Up one directory
cd ~                # Home directory

# Copy/Move/Delete
cp file.txt backup.txt
cp -r folder/ backup/
mv old.txt new.txt
rm file.txt
rm -rf folder/      # Careful with this one

Searching

# Find files
find . -name "*.php"
find /var/log -mtime -1  # Modified in last day

# Search file contents
grep "error" log.txt
grep -r "TODO" ./src     # Recursive
grep -i "warning" log.txt  # Case insensitive

Text Processing

# View files
cat file.txt
head -20 file.txt   # First 20 lines
tail -f log.txt     # Follow new lines

# Count
wc -l file.txt      # Line count

# Filter columns
awk '{print $1}' file.txt

# Replace text
sed 's/old/new/g' file.txt

Pipes

Chain commands together:

# Find PHP files containing "class"
find . -name "*.php" | xargs grep "class"

# Count lines of code
find . -name "*.js" | xargs wc -l | tail -1

# Filter logs
cat access.log | grep "500" | awk '{print $1}' | sort | uniq -c

SSH

# Connect
ssh user@server.com

# Copy files
scp file.txt user@server:/path/
scp -r folder/ user@server:/path/

# SSH key
ssh-keygen -t ed25519
ssh-copy-id user@server

Process Management

# Running processes
ps aux
ps aux | grep nginx

# Kill process
kill 1234           # Graceful
kill -9 1234        # Force

# Background jobs
./script.sh &       # Run in background
nohup ./script.sh & # Survives logout

About the Author

matt

I build and ship automation-driven products using Laravel and modern frontend stacks (Vue/React), with a focus on scalability, measurable outcomes, and tight user experience. I’m based in Toronto, have 13+ years in PHP, and I also hold a pilot’s license. I enjoy working on new tech projects and generally exploring new technology.