Lesson 14 — Logs, Disk & System Health Basics

CompTIA Cyber Path • Linux / Admin Basics • Lesson 14

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.

Core idea:

Good health checks move in layers: check disk spacefind what is largecheck memorycheck load and uptimereview logs for recent problems.

What you’ll be able to do:

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.

Linux basics df + du free + uptime journalctl + local progress
Progress: 0%
Check Filesystem Usagedf -h
Find Large Directoriesdu -sh
Check Memory / Loadfree -h / uptime
Review Logsjournalctl
Good troubleshooting flow: Is disk space low?What is large?Is memory/load a problem?What do recent logs suggest?

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 journalctl to 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.

df -h

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.

Important habit:

“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

du -sh /var/log du -sh /home

This shows a summarized size for one location.

Check top-level directories

du -sh /* 2>/dev/null

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

free -h

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
Real-world habit:

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

uptime

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

journalctl –no-pager -n 25

This shows recent journal entries without forcing you into a pager.

Show logs for current boot

journalctl -b –no-pager -n 50

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

  1. Check filesystem usage
  2. Find large directories if space is low
  3. Check memory usage
  4. Check uptime and load
  5. Review recent logs for clues
df -h du -sh /var/log free -h uptime journalctl –no-pager -n 25

Practical — Check a Unhealthy Linux System

This practical teaches a real support workflow instead of random command memorization.

Practical Task

  • Run df -h and look for high usage
  • Use du -sh on a likely path such as /var/log or /home
  • Run free -h to inspect memory
  • Run uptime for a quick load snapshot
  • Review recent logs and write one sentence about the health of the system

Walkthrough

df -h du -sh /var/log free -h uptime journalctl –no-pager -n 25

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

🔒 Locked until quiz ≥ 75% and you mark complete
Lesson 15 — Basic Backup, Archives & File Transfer

Tip: update the next lesson link when your page exists.

Leave a Comment