Display only journal entries belonging to the current boot ID.
Which command is appropriate?
journalctl -b filters entries to the current boot. Other options select kernel messages, follow mode, or units.
Detailed explanation
journalctl -bCorrect. -b selects the current boot's journal.
Correct. -b selects the current boot's journal.
journalctl -kIncorrect. -k selects kernel messages.
Incorrect. -k selects kernel messages.
journalctl -fIncorrect. -f follows newly arriving messages.
Incorrect. -f follows newly arriving messages.
journalctl -uIncorrect. -u requires a unit name and filters by service.
Incorrect. -u requires a unit name and filters by service.
Try it yourself
An example you can run in a temporary verification environment.
journalctl --help | grep -E -- '-b|--boot' | head -n 1Expected result
current bootを示すhelp行Key points
- -b filters by boot
- -k filters kernel
- -f follows new entries
Notes
- Environment: systemd journalctl help / journal読取なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.