journalctl Flashcards
1
Q
journalctl
Help pages 1-2
![](https://s3.amazonaws.com/brainscape-prod/system/cm/312/979/952/q_image_thumb.png?1591033669)
A
Used to query the contents of the systemd journal logs.
![](https://s3.amazonaws.com/brainscape-prod/system/cm/312/979/952/a_image_thumb.png?1591033677)
2
Q
journalctl -b [ID] [+- offset]
A
-b Show messages from a specific boot.
[ID]
boot ID can be entered
[+- offset]
- 1 would display last boot
- 2 would display boot before last
3
Q
journalctl -S -U
–since –until
A
-S –since
Shows logs with timestamps since the date chosen. The format can be in 00:00:00 or string format.
4
Q
journalctl –list-boots
A
–list-boots
Lists the previous boot numbers
5
Q
journalctl -u
A
-u
Shows logs filtered by systemd unit.
example: nginx.service
6
Q
journalctl -f
A
-f –follow
Shows only the most recent log entries
7
Q
journalctl -r
A
-r –reverse
Reverses output so newest entries are first.