819 words
4 minutes
Most Used Linux Commands for Development

Most Used Linux Commands for Development#

This article lists the essential Linux commands for developers in daily work, including file editing, process control, networking, debugging, Git operations, and container management. These commands are universally used across backend, frontend, DevOps, and scripting development.

Format Description#

NOTE

Standard identifiers for understanding command syntax:

IdentifierDescription
$Terminal command prompt
BoldCore command
ItalicCustom parameter
filenameFile name (with extension optional)
dirDirectory path
portNetwork port number
pidProcess ID
urlWeb address
branchGit branch name
envEnvironment variable

Command Help & System Info#

TIP

Quickly get help and check system environment for development setup

Terminal window
man command # View full command manual
help command # Get help for shell built-in commands
which command # Locate executable binary path
uname -a # Show OS, kernel, architecture
lsb_release -a # Check Linux distribution version
hostname # Show current machine hostname
date # Show system time (critical for log debugging)

File & Directory Operations (Most Used)#

NOTE

Foundation for code management, configuration editing, and project navigation

Terminal window
ls -la # List all files (including hidden) with details
cd dir # Navigate to directory
cd .. # Go back to parent directory
pwd # Print current working path
mkdir -p dir # Create nested directories
touch filename # Create empty file / update timestamp
cp -r src dest # Copy files/directories recursively
mv src dest # Move/rename files
rm -rf dir # Force delete files/dirs (use carefully)
cat filename # View short file content
less filename # View large files (scrollable, searchable)
tail -f filename # Real-time log monitoring (essential for debugging)
wc -l filename # Count lines in code/log files
du -sh . # Check current directory size
TIP

Critical for code editing, log analysis, and config modification

Terminal window
vim filename # Edit file (Vim editor)
nano filename # Simple editor for beginners
grep -rn "keyword" . # Recursively search keyword in current directory
grep -i "key" file # Case-insensitive search
find . -name "*.js" # Find all JS files in project
sed -i 's/old/new/g' file # Replace text in file (batch edit)
diff file1 file2 # Compare two code/config files

Permissions & Ownership#

NOTE

Commonly used for server config, web servers, and script execution

Terminal window
chmod +x script.sh # Make script executable
chmod 755 file # Set read/write/execute permissions
chown user:group file # Change file owner/group
sudo command # Run command as root (privileged operations)

Process Management#

WARNING

Essential for starting/stopping services, debugging hanging applications

Terminal window
ps aux # List all running processes
ps aux | grep node # Find Node.js/any app process
top # Real-time process resource monitor
htop # Enhanced process viewer (better than top)
kill pid # Terminate process gracefully
kill -9 pid # Force kill unresponsive process
pkill process_name # Kill process by name
jobs # Show background tasks
bg # Move paused process to background
fg # Bring background process to foreground

Port & Network Operations#

NOTE

Used for API testing, server debugging, and connection checks

Terminal window
ping host # Test network connectivity
curl url # Send HTTP request (test APIs)
curl -I url # Show response headers only
netstat -tulpn # Check open ports and processes
ss -tulpn # Modern alternative to netstat
lsof -i :port # Check which process uses a specific port
wget url # Download files/resources
scp file user@host:path # Secure file transfer to server

Environment Variables#

Terminal window
env # List all environment variables
echo $PATH # View PATH variable
export VAR=value # Set temporary env var
source ~/.bashrc # Reload shell config (apply permanent env vars)

Disk & System Monitoring#

Terminal window
df -h # Check disk usage
free -h # Check memory usage
iostat # Monitor disk I/O performance
uptime # Check system load and uptime

Git Commands (Development Core)#

TIP

Indispensable for version control in team development

Terminal window
git init # Initialize Git repo
git clone url # Clone remote repository
git status # Check file changes
git add . # Stage all changes
git commit -m "msg" # Commit changes
git push # Push to remote branch
git pull # Pull latest code
git branch # List local branches
git checkout branch # Switch branch
git merge branch # Merge branch
git log # View commit history
git diff # Check uncommitted code changes

Container & DevOps (Modern Development)#

NOTE

Widely used in microservices, cloud, and local development environments

Terminal window
docker ps # List running containers
docker ps -a # List all containers
docker images # List local images
docker run image # Start container
docker stop container # Stop container
docker rm container # Delete container
docker exec -it container bash # Enter container shell
docker-compose up -d # Start services in background
docker-compose logs -f # View container logs

Scripting & Automation#

Terminal window
bash script.sh # Run shell script
./script.sh # Run executable script
crontab -l # List scheduled tasks
crontab -e # Edit cron jobs (automate tasks)

Package Management#

Terminal window
apt update && apt install pkg # Debian/Ubuntu package install
yum install pkg # CentOS/RHEL package install
brew install pkg # macOS package install
npm install pkg # Node.js package install
pip install pkg # Python package install

Summary#

This collection includes developer-focused Linux commands that cover daily coding, debugging, server operations, Git version control, and container management. Mastering these commands will significantly improve your efficiency in development and server maintenance.

Most Used Linux Commands for Development
https://fuwari.vercel.app/posts/learning/linux-practical-command/
Author
Zero02
Published at
2026-04-02
License
CC BY-NC-SA 4.0