Lesson 14 — Logs, Disk & System Health Basics
df -h + du -sh + free -h + uptime + journalctl
When a Linux system feels unhealthy, the best move is not random guessing. This lesson teaches a clean troubleshooting flow using df -h to check filesystem usage, du -sh to find what is consuming space, free -h to inspect memory, uptime to get a quick view of system load and uptime, and journalctl to review recent logs.
Good health checks move in layers: check disk space → find what is large → check memory → check load and uptime → review logs for recent problems.
Spot low disk space, identify large directories, read basic memory output, interpret simple uptime/load information, and use logs to begin investigating system health issues.
Lesson Objectives
By the end of this lesson
- Check filesystem usage with
df -h - Find large directories with
du -sh - Inspect memory with
free -h - Read uptime and load basics with
uptime - Use
journalctlto inspect recent logs
Why this matters
- A full filesystem can break updates, services, and log writing
- A system can feel slow because memory or load is under pressure
- Logs often give clues that simple status commands do not
1) Check Filesystem Usage with df -h
Show mounted filesystem usage
Use df -h to see total space, used space, available space, and mount points in a human-readable format.
What to look for
- Filesystems that are close to 100% used
- The root filesystem becoming dangerously full
- Unexpected usage on application or log partitions
Why this matters
If a system cannot write new data, many things can fail: updates, logs, temp files, services, and even logins in worse cases.
“The server is acting weird” sometimes really means “the disk is almost full.” Check disk usage early.
2) Find Large Directories with du -sh
df -h tells you a filesystem is full. du helps you find what is actually taking space.
Check one directory
This shows a summarized size for one location.
Check top-level directories
This can help you quickly spot which major path is unusually large.
Use both commands together
First use df -h to confirm low space. Then use du to narrow down where the space is going.
3) Check Memory with free -h
free -h gives a simple view of memory and swap usage in a readable format.
Show memory usage
This helps you understand whether RAM and swap look normal or pressured.
What to watch
- Very low available memory
- Heavy swap usage
- Whether memory pressure might explain poor performance
Do not panic just because memory is being used. Linux uses memory efficiently. Look at available memory and overall system behavior, not just one number.
4) Check Load and Uptime with uptime
uptime gives a quick snapshot of how long the system has been running and what recent load averages look like.
Basic command
Useful for a quick health glance when first connecting to a Linux system.
What it can tell you
- How long the system has been up
- How many users are logged in
- Recent load averages across short and longer windows
Basic interpretation
High load does not always mean a disaster, but it is a useful signal that the system may be under pressure and worth inspecting further with tools like top.
5) Review Logs with journalctl
journalctl lets you inspect recent system logs and is often one of the best places to look when a system or service seems unhealthy.
Show recent logs
This shows recent journal entries without forcing you into a pager.
Show logs for current boot
This is useful when the system had issues after the latest boot.
Why this matters
Disk warnings, memory pressure, failed services, and other health issues often leave clues in the logs even when the system seems only “kind of broken.”
6) Fast Troubleshooting Pattern
- Check filesystem usage
- Find large directories if space is low
- Check memory usage
- Check uptime and load
- Review recent logs for clues
Practical — Check a Unhealthy Linux System
This practical teaches a real support workflow instead of random command memorization.
Practical Task
- Run
df -hand look for high usage - Use
du -shon a likely path such as/var/logor/home - Run
free -hto inspect memory - Run
uptimefor a quick load snapshot - Review recent logs and write one sentence about the health of the system
Walkthrough
The goal is not to memorize every possible output. The goal is to build a clean sequence for checking whether the system has a storage issue, a memory issue, a load issue, or recent logged errors.
Example Ticket Note
Performed basic Linux health check. Verified filesystem usage with df -h, reviewed directory size with du -sh, checked memory with free -h, reviewed load with uptime, and checked recent journal entries for additional errors.
Write Your Observation
Use a simple note like a junior admin would write.
Mini Knowledge Check
Score 75% or higher to unlock the next lesson link. Your score is saved on this browser.
1) Which command is best for checking mounted filesystem usage?
2) What is a strong use for du -sh?
3) Which command shows memory usage in a readable format?
4) What is the strongest health-check habit from this lesson?
Next Lesson
Tip: update the next lesson link when your page exists.