File Operations
ls -lah | List files with details |
cp -r src/ dst/ | Copy recursively |
mv file newname | Move/rename file |
rm -rf dir/ | Remove directory recursively |
find . -name '*.log' | Find files by name |
grep -r 'pattern' . | Search file contents |
chmod 755 file | Set permissions |
chown user:group file | Change ownership |
ln -s target link | Create symlink |
Process Management
ps aux | List all processes |
top / htop | Interactive process monitor |
kill -9 | Force kill process |
pkill nginx | Kill by name |
nohup cmd & | Run in background |
jobs / fg / bg | Job control |
Networking
ss -tlnp | Show listening ports |
netstat -tulpn | Network connections |
curl -I https://example.com | HTTP headers |
wget -O file url | Download file |
scp file user@host:path | Secure copy |
ssh -i key.pem user@host | SSH with key |
System
df -h | Disk usage |
du -sh * | Directory sizes |
free -h | Memory usage |
uptime | System uptime |
uname -a | System info |
tail -f /var/log/syslog | Follow log file |
journalctl -u nginx -f | Systemd service logs |
systemctl start/stop/restart | Manage services |