Linux Commands Every Developer Should Know
0 views
Linux Commands Every Developer Should Know
A short list of Linux commands that come up often in development and DevOps.
Files and directories
| Command | Description |
|---|---|
pwd | Print working directory |
ls -la | List files (long, include hidden) |
cd <dir> | Change directory |
mkdir -p a/b/c | Create directory tree |
cp -r src dest | Copy recursively |
mv a b | Move or rename |
rm -rf dir | Remove directory (careful!) |
Viewing and editing
| Command | Description |
|---|---|
cat file | Print file contents |
less file | Paginated view |
head -n 5 file | First 5 lines |
tail -f log.txt | Follow log file |
grep -r "pattern" . | Search in files |
Processes and system
| Command | Description |
|---|---|
ps aux | List processes |
kill -9 <PID> | Force kill process |
top or htop | Interactive process list |
df -h | Disk usage |
free -h | Memory usage |
Permissions
chmod +x script.sh – make executable
chown user:group file – change owner
Combine with pipes: cat file | grep "error" | wc -l