Linux
Linux

Essential Linux Server Health Check Commands

A practical set of Linux commands to quickly inspect CPU, memory, disk, services, ports, logs, and system uptime on a server.

Jan 1, 1970·1 min read

Linux Server Health Check

These commands are useful when you log into a Linux server and need a quick idea of what is happening.

System Uptime

uptime
uptime

Shows how long the server has been running, current users, and load average.

CPU And Memory

top
top

For a cleaner memory view:

free -h
free -h

Disk Usage

df -h
df -h

Check large folders from the current directory:

du -sh * | sort -h
du -sh * | sort -h

Running Services

systemctl status nginx
systemctl status nginx

Replace nginx with any service name.

Open Ports

ss -tulpn
ss -tulpn

This shows listening ports and the processes using them.

Recent Logs

journalctl -xe
journalctl -xe

For a specific service:

journalctl -u nginx --since "1 hour ago"
journalctl -u nginx --since "1 hour ago"

Failed Services

systemctl --failed
systemctl --failed

Quick One-Liner

uptime && free -h && df -h && systemctl --failed
uptime && free -h && df -h && systemctl --failed

When To Use This

Use this checklist before debugging an application issue. It helps confirm whether the problem is caused by system load, full disk, failed services, or network ports.