Linux Commands Every Developer Must Know

Sanjeev SharmaSanjeev Sharma
2 min read

Advertisement

Linux Commands Every Developer Must Know

Master essential Linux commands for DevOps and development work.

Introduction

Linux proficiency is fundamental to DevOps. Learn commands for file management, networking, and system operations.

File Operations

# Navigate directories
cd /path
pwd
ls -la

# Create/delete
mkdir folder
touch file.txt
rm file.txt
rm -r folder

# Copy/move
cp source dest
mv old new

# View files
cat file.txt
less file.txt
tail -f file.txt
head -n 20 file.txt

# Find files
find / -name "*.txt"
locate filename
grep "pattern" file.txt

Permissions

# Change permissions
chmod 755 file.txt
chmod u+x script.sh

# Change owner
chown user:group file.txt
sudo chown root file.txt

# View permissions
ls -l
stat file.txt

Networking

# Network info
ifconfig
ip addr
netstat -tlnp
ss -tlnp

# DNS
nslookup example.com
dig example.com

# Connectivity
ping example.com
curl https://example.com
wget file.zip
traceroute example.com

# SSH
ssh user@host
ssh -i key.pem user@host
scp file.txt user@host:/path/

System Administration

# User management
adduser newuser
passwd username
usermod -aG sudo username
deluser username

# Disk usage
df -h
du -sh /path
du -sh /*

# Processes
ps aux
top
kill PID
pkill processname

# Services
systemctl start service
systemctl stop service
systemctl status service
systemctl restart service

FAQ

Q: What are essential permissions? A: 755 (rwxr-xr-x) for scripts, 644 (rw-r--r--) for files.

Advertisement

Sanjeev Sharma

Written by

Sanjeev Sharma

Full Stack Engineer · E-mopro