Forrest logo
back to the journalctl tool

journalctl:tldr:e2826

journalctl: Show all messages from last [b]oot.
$ journalctl -b -1
try on your machine

The command "journalctl -b -1" is used to display system journal messages from the previous boot session. Let's break down the command into its components:

  • "journalctl": It is the command that provides access to the systemd journal, which logs various system events and messages.

  • "-b": It is a flag that filters the displayed logs based on the boot ID. By default, it shows logs from the current boot session. However, using "-b -1" specifies the previous boot.

  • "-1": The number following the "-b" flag refers to the boot number. In this case, "-1" signifies the previous boot session.

So, in summary, the "journalctl -b -1" command presents the system journal logs specifically from the previous boot.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the journalctl tool