System & Networking
When a server is slow or a service is unreachable, these are the tools you'll use to diagnose and fix the issue.
System Monitoring
top: Displays an interactive, real-time view of running processes.htop: A modern, colorful, and more user-friendly version oftop.ps aux: List all running processes in detail.kill -9 <PID>: Forcefully terminate a process by its ID.uptime: See how long the system has been running and the current load average.free -h: Check available memory (RAM) in a human-readable format.df -h: Check disk free space.
Networking Tools
ping <host>: Check connectivity to a server (e.g.,ping google.com).nslookup <domain>: Query DNS to find the IP address of a domain.curl -v <url>: Fetch the content of a URL (use-vfor verbose headers).ifconfig/ip addr: Display or configure network interfaces and see your IP address.netstat -tulnp: List all tcp/udp ports the system is listening on.telnet <host> <port>: Test if a specific port is open on a remote host.
Summary Table
| Tool | Category | Primary Use |
|---|---|---|
htop | Process | Real-time CPU/RAM monitoring |
df -h | Storage | Checking disk usage |
nslookup | Network | Troubleshooting DNS issues |
curl | Network | Testing API endpoints |
netstat | Network | Checking for port conflicts |
[!NOTE] Load average (seen in
toporuptime) represents the average number of processes waiting for CPU time. If it's higher than your CPU core count, the system might be overloaded.