Processes, services & networking
Checking CPU, memory and disk, managing processes and services, and basic network troubleshooting.
When an app is slow or down, these are the first commands to run:
top/htop— live CPU and memory by process.ps aux | grep java— find a process and its PID;kill PIDstops it.df -h— disk space;free -h— memory.systemctl status|start|restart nginx— manage services;journalctl -u nginxshows their logs.ss -tulpn— which ports are open and by whom.curl,ping,dig— test URLs, reachability and DNS.
Connect to remote servers with ssh user@server, using SSH keys rather than passwords.
Example in the terminal
Run these on your own computer$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 40G 38G 2.0G 95% /
$ free -h
total used free
Mem: 7.8Gi 6.9Gi 0.9Gi
$ ps aux --sort=-%mem | head -3
USER PID %CPU %MEM COMMAND
app 1842 12.0 61.5 java -jar jobs-api.jar
root 901 0.3 2.1 nginx: master process
$ sudo systemctl restart jobs-api
$ systemctl is-active jobs-api
active
$ curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8080/actuator/health
200
Lines starting with $ are commands you type; the rest is what the terminal prints. Use Linux, macOS, WSL on Windows or a free cloud shell. Names and paths are examples.
Key points
- top, free -h and df -h show CPU, memory and disk.
- ps finds processes; kill stops them.
- systemctl manages services; journalctl shows their logs.
- curl and ss check that an app is listening and responding.
Quick check
Disk shows 95% used and the app can't write logs. Which command confirmed the disk problem?
df -h reports disk space per file system; free -h is for memory.
Practice task
Check your machine's disk usage, memory and the top 3 processes by memory, and write down which one uses the most.
Interview corner
A Linux server is slow. How do you troubleshoot?
Check load and the busiest processes with top, memory with free -h, disk space with df -h and disk I/O with iostat, read application and system logs, check network and dependencies with curl or ping, and compare against when the problem started (a deployment or traffic spike).
How do you see which process is using a port?
ss -tulpn (or netstat -tulpn, or lsof -i :8080) lists listening ports with the process name and PID.
Further reading
Official documentation, linked for deeper study. These are outside sites; this lesson's text is our own.
Original lesson written by the InfoparkDaily team · © 2026 InfoparkDaily · Free to learn — no paid course or subscription.