# journalctl

> A command that reads the system log. It can show one service at a time.

**Field:** Infrastructure  
**Category:** Linux & the Command Line  
**Also known as:** journalctl Command, systemd Journal, System Log

## Think of it like

Think of it like a ship's logbook. Every event goes in, and you can read back what happened.

## Definition

journalctl reads the system log that systemd keeps. Every service writes its messages there, with the time. You can show the messages for one service with -u and its name. Adding -f follows new lines as they arrive. It is the first place to look when a service will not start.

## Example

Jack's web server will not start. He runs journalctl -u nginx and sees a typo in a settings file.

## Example code

```console
$ journalctl -u ssh -n 1
Nov 16 09:00:01 web1 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
```

The last log line for the SSH service. It says when the service started.

## Why it matters

A service that fails rarely says why on screen. The reason is almost always in the log.

## Common mistake

Scrolling the whole log by hand. Narrow it to one service with -u.

## Three principles

- **One log.** Every service writes to it.
- **-u for one service.** Shows only that service.
- **-f to follow.** Watch new lines arrive.

## Related terms

- [systemd](https://learn.benibix.com/term/infrastructure/systemd)
- [Daemon](https://learn.benibix.com/term/infrastructure/daemon)
- [Logging](https://learn.benibix.com/term/infrastructure/logging)
- [Command Line](https://learn.benibix.com/term/infrastructure/command-line)

## Taught in

- [systemd and Daemons](https://learn.benibix.com/learn/infrastructure-linux/systemd-and-daemons): Linux CLI, 8/10

![systemd at the top, marked process number 1, starts and restarts three daemons below it: nginx, sshd and cron. All three daemons write lines into a journal at the bottom, and journalctl reads them back.](https://learn.benibix.com/diagrams/inf3-services.svg)

---

Source: https://learn.benibix.com/term/infrastructure/journalctl
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
