10 Essential Linux Commands Every Developer Should Know

Whether you're a developer, system administrator, or tech enthusiast, mastering Linux commands is essential for modern software development. After years of working with Linux systems, I've identified the 10 commands that deliver the most value for everyday tasks.
These aren't just commands to memorize - they're tools that will transform how you work with files, processes, and systems.
1. ls - List Directory Contents
The foundation of file navigation. While ls seems simple, its options unlock powerful functionality:
# Basic listing
ls
# Detailed view with permissions, size, and timestamps
ls -lah
# Sort by modification time (newest first)
ls -lt
# Sort by size (largest first)
ls -lS
Pro Tip:
Use ls -lah as your default. The -a shows hidden files, -l gives detailed info, and -h makes file sizes human-readable (MB, GB instead of bytes).
2. cd - Change Directory
Navigate your filesystem like a pro:
# Go to home directory
cd ~
# Go up one level
cd ..
# Go to previous directory
cd -
# Navigate to specific path
cd /var/log
Time-Saver:
cd - toggles between your current and previous directory - incredibly useful when working between two locations.
3. grep - Search Text Patterns
Find exactly what you're looking for in files:
# Search for a pattern in a file
grep "error" application.log
# Case-insensitive search
grep -i "warning" *.log
# Show line numbers
grep -n "TODO" app.js
# Recursive search in directories
grep -r "function" src/
Real-World Use:
Debugging logs? grep -i "error\|warning" app.log finds all errors and warnings in one command.
4. find - Locate Files
When you know what you're looking for but not where it is:
# Find all Python files
find . -name "*.py"
# Find files modified in last 7 days
find . -mtime -7
# Find large files (over 100MB)
find . -size +100M
# Find and delete old logs
find /var/log -name "*.log" -mtime +30 -delete
Power Move:
Combine find with grep: find . -name "*.js" -exec grep -l "React" {} \; finds all JavaScript files containing "React".
5. chmod - Change File Permissions
Control who can read, write, and execute your files:
# Make script executable
chmod +x script.sh
# Set specific permissions (owner: read/write, group: read, others: none)
chmod 640 file.txt
# Recursive permission change
chmod -R 755 directory/
Permission Quick Reference:
7 (rwx) = read + write + execute
6 (rw-) = read + write
5 (r-x) = read + execute
4 (r--) = read only
6. ps - Process Status
Monitor what's running on your system:
# Show your processes
ps aux
# Find specific process
ps aux | grep nginx
# Show process tree
ps auxf
# Monitor real-time (use top or htop instead for interactive)
top
Debug Like a Pro:
ps aux | grep [p]rocess_name - the brackets prevent grep from showing itself in results.
7. tar - Archive and Compress
Package and compress files efficiently:
# Create compressed archive
tar -czf archive.tar.gz directory/
# Extract archive
tar -xzf archive.tar.gz
# View archive contents without extracting
tar -tzf archive.tar.gz
# Extract to specific directory
tar -xzf archive.tar.gz -C /destination/path
Memory Aid:
-c= create-x= extract-z= gzip compression-f= file (always last before filename)
8. ssh - Secure Shell
Connect to remote servers securely:
# Basic connection
ssh user@hostname
# Use specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Execute remote command
ssh user@hostname 'ls -la /var/www'
# Port forwarding
ssh -L 8080:localhost:80 user@hostname
Security Tip:
Always use SSH keys instead of passwords. Generate with: ssh-keygen -t ed25519
9. df and du - Disk Usage
Monitor your disk space:
# Show disk space (human-readable)
df -h
# Show directory sizes
du -sh */
# Find largest directories
du -h --max-depth=1 | sort -hr
# Show specific directory size
du -sh /var/log
Clean Up Space:
Run du -sh /* | sort -hr | head -10 to find the 10 largest directories consuming space.
10. curl - Transfer Data
Download files, test APIs, and debug web services:
# Download file
curl -O https://example.com/file.zip
# Test API endpoint
curl -X GET https://api.example.com/users
# POST JSON data
curl -X POST -H "Content-Type: application/json" \
-d '{"name":"John"}' https://api.example.com/users
# Follow redirects and show headers
curl -LI https://example.com
API Testing:
Use curl with -v for verbose output when debugging: curl -v https://api.example.com
Combining Commands for Maximum Power
The real magic happens when you chain these commands together:
# Find all Python files modified today and count lines of code
find . -name "*.py" -mtime 0 -exec wc -l {} + | tail -1
# Monitor log files in real-time
tail -f /var/log/application.log | grep --line-buffered "ERROR"
# Find and compress old log files
find /var/log -name "*.log" -mtime +30 -exec tar -czf logs-archive.tar.gz {} +
# Search code and open in editor
grep -r "function getName" . | cut -d: -f1 | uniq | xargs vim
Your Command Line Journey
Start by mastering one command per day. Practice it in real scenarios. Within two weeks, these commands will become second nature, and you'll wonder how you ever worked without them.
These fundamentals are just the beginning. For a comprehensive guide to 70+ Linux commands with practical examples, check out The Practical Linux Handbook.
This Week's Challenge:
Choose 3 commands from this list and use them daily. Keep a cheat sheet until they're muscle memory. You'll be amazed at how much faster you work.
Remember: Every Linux expert started exactly where you are now. The difference? They practiced consistently.
Master Linux Commands and System Administration
Want to go beyond the basics? The Practical Linux Handbook covers 70+ essential commands, file operations, system monitoring, network tools, and real-world examples that will make you a Linux power user.
Includes:
- 70+ Linux commands with practical examples
- File system navigation and management
- Process and system monitoring
- Network operations and troubleshooting
- 3 bonus editor cheat sheets (Vim, Nano, Emacs)
- Code repository with all examples
Get Your Copy | Read Free Sample | Learn More
About the Author
Vajo Lukic is a software developer and technical writer with extensive experience in Linux system administration and development. Author of The Practical Linux Handbook, he helps developers master essential Linux commands and workflows. Connect with Vajo on Twitter or LinkedIn.
Related Posts
- Linux File Permissions Demystified: A Complete Guide
- Mastering the Linux Terminal: From Beginner to Power User
Which Linux command do you use most? Share your favorites in the comments below.
Enjoyed this article? Share it!
About the Author
Vajo Lukic
Vajo Lukic is a technology leader with 20+ years of experience in software development and system administration. Author of The Practical Linux Handbook, he shares practical, field-tested knowledge to help developers and IT professionals master Linux fundamentals.
Read more about VajoRelated Articles

Mastering the Linux Terminal: From Beginner to Power User
My journey from fearing the command line to becoming a Linux power user. Learn the mindset shifts, essential skills, and practical workflows that transformed my productivity.
Read more →
Linux Process Management: A Complete Guide to ps, top, kill, and htop
Learn to list, monitor, and control Linux processes with ps, top, htop, and kill. Fix runaway processes, manage background jobs, and understand process states.
Read more →
Linux Shell Scripting for Beginners: From Zero to Your First Script
Learn Linux shell scripting from scratch. Variables, conditionals, loops, and functions explained with practical examples you can use immediately.
Read more →Ready to Transform Your Life?
Get the complete guide to personal transformation and start your journey today.
Get the Book