Linux Commands for Developers — Essential Productivity Guide

Master essential Linux commands: file management, text processing, process management, networking, and system monitoring.

General Beginner 📖 9 min

File System

ls -lah                   # List files with sizes and hidden
find / -name "*.log" -mtime -1  # Find files modified today
du -sh /var/log           # Check directory size
df -h                     # Disk space usage
ln -s source link         # Create symbolic link

Text Processing

grep -rn "error" /var/log/  # Search recursively with line numbers
awk '{print $1, $4}' access.log  # Print columns 1 and 4
sed 's/old/new/g' file.txt  # Replace text in file
sort -k2 -n data.txt        # Sort by second column numerically
cut -d',' -f1,3 data.csv    # Extract CSV columns 1 and 3
wc -l file.txt              # Count lines

Process Management

ps aux                     # List all processes
ps aux | grep node          # Find specific process
kill -9 PID                 # Force kill process
top                        # Real-time process monitor
htop                       # Better process monitor
nohup long-command &       # Run command in background

Networking

curl -I https://example.com  # HTTP headers only
curl -X POST -d '{}' URL     # POST request
netstat -tlnp                # Listening ports
ss -tlnp                     # Modern netstat replacement
ping -c 4 google.com         # Ping with count
wget -c URL                  # Resume download

Permissions

chmod 755 script.sh          # rwxr-xr-x
chmod +x script.sh           # Make executable
chown user:group file.txt    # Change ownership
chmod -R 644 /var/www/       # Recursive permission change

Ready to Level Up Your Coding Skills?

Join Coderz Club and learn to code with challenges, battles, and an AI mentor.

Join Coderz Club Free →