System Overview
"What kind of server is this? How long has it been up? What version is the kernel?"
These questions come up constantly. Let's learn the quick answers.
hostname - What's This Machine Called?
-f gives the fully qualified domain name (FQDN).
uname - System Information
-a shows everything: kernel name, hostname, kernel version, architecture.
Individual Flags
| Flag | Shows |
|---|---|
-s | Kernel name (Linux) |
-n | Hostname |
-r | Kernel release |
-v | Kernel version |
-m | Machine hardware (x86_64) |
-o | Operating system |
uptime - How Long Running?
Shows:
- Current time
- Uptime
- Users logged in
- Load averages (1, 5, 15 minutes)
Load Average
Load average shows CPU demand. Compare to your core count:
- 1.0 on 1 core = 100% utilized
- 4.0 on 4 cores = 100% utilized Higher than core count = overloaded
Distribution Information
/etc/os-release
lsb_release
Date and Time
%s gives Unix timestamp (seconds since 1970).
Timezone
Quick System Check Script
echo "=== System Overview ==="
echo "Hostname: $(hostname)"
echo "OS: $(cat /etc/os-release | grep PRETTY_NAME | cut -d'=' -f2)"
echo "Kernel: $(uname -r)"
echo "Uptime: $(uptime -p)"
echo "Users: $(who | wc -l)"
echo "Load: $(cat /proc/loadavg | cut -d' ' -f1-3)"
What does a load average of 4.0 on a 2-core system indicate?
Quick Reference
| Command | Shows |
|---|---|
hostname | Machine name |
uname -a | All system info |
uname -r | Kernel version |
uptime | Uptime and load |
cat /etc/os-release | Distribution info |
date | Current date/time |
timedatectl | Time settings |
Key Takeaways
hostnametells you what machine you're onuname -agives kernel and architectureuptimeshows how long system's been running/etc/os-releaseidentifies the distribution- Load average should stay below your core count
Next: checking disk usage.