Back to practice tasks

practice task

List Failed systemd Units

After a reboot, a host is reachable but something feels broken. You need a quick inventory of failed units before digging into individual logs.

Independent study support only. No affiliation, endorsement, exam dumps, or guaranteed exam results.

Try first

systemctl --failed --no-pager

Goal

Find failed units and choose one unit to inspect with status and journal output.

Expected output

A list of failed loaded units, usually with UNIT, LOAD, ACTIVE, SUB, and DESCRIPTION columns. No failed units means the list should be empty.

Teaches

Use systemd's own failed-unit state as the first triage list after boot or deploy.

Common mistake

Restarting services one by one without first seeing which units systemd already marked as failed.

command set

Commands to know

  1. systemctl --failed
  2. systemctl status UNIT --no-pager
  3. journalctl -u UNIT -b --no-pager

Watch this command run

Example output from a temporary Linux lab

next practice

Check Pending Package Updates

A Debian or Ubuntu server may be missing important updates. You need to list pending upgrades without installing anything.