# System Health

Users, logs, services and the numbers that say whether a computer is healthy. Linux (and WSL) first, with the Mac's equivalents named.

Updated: November 10, 2026

## [People](https://www.ask-codey.com/courses/bash-in-depth/topics/bash-people)

1. [Users and Groups](https://www.ask-codey.com/lessons/bash-users-and-groups) (Journeyman): Every person and many programs on a Linux computer have a user account with a number and a list of groups: whoami, id and groups show yours, /etc/passwd lists every account, adduser and usermod -aG add a person and a group, and a server runs each program as a user of its own.

## [Watching](https://www.ask-codey.com/courses/bash-in-depth/topics/bash-watching-system-health)

1. [Reading System Logs](https://www.ask-codey.com/lessons/bash-system-logs) (Journeyman): Programs on a Linux computer write down what happens in logs, the files in /var/log and systemd's journal; journalctl -u shows one service's lines, -f watches new ones arrive, and on a Mac log show and the Console app do the same job.
2. [Services: systemctl](https://www.ask-codey.com/lessons/bash-services) (Journeyman): A service is a program that runs in the background with no window and starts when the computer does; on Linux, systemd runs them, systemctl status shows whether one is running, and sudo systemctl start, stop, restart, enable and disable change it now or at every start-up.
3. [Is It Healthy? Memory, Load and Uptime](https://www.ask-codey.com/lessons/bash-system-health) (Journeyman): uptime says how long a computer has been running and how busy it is, which you compare with the number of CPUs nproc prints; free -h says how much memory is still available and df -h how much disk is left; and a short script puts them all on one screen.

## [Exercise: The Health Check](https://www.ask-codey.com/courses/bash-in-depth/topics/exercise-bash-the-health-check)

1. [Exercise: The Health Check](https://www.ask-codey.com/lessons/exercise-bash-the-health-check) (Journeyman): Finish a health check script for a book club's home server: read the disk, memory, load and failed services, warn about each problem, and exit with a code that says whether all is well, while a check script runs it on a pretend computer, job by job.

Source: https://www.ask-codey.com/courses/bash-in-depth/chapters/bash-system-health
