Show journal entries with priority err and the more severe crit, alert, and emerg levels.
Which command is appropriate?
journalctl -p PRIORITY filters to the selected priority and more severe levels. -p err covers err through emerg.
Detailed explanation
journalctl -t errIncorrect. -t selects an identifier tag.
Incorrect. -t selects an identifier tag.
journalctl -p errCorrect. -p err selects err and more severe entries.
Correct. -p err selects err and more severe entries.
journalctl -u errIncorrect. -u selects a systemd unit.
Incorrect. -u selects a systemd unit.
journalctl -b errIncorrect. -b selects a boot, not a priority.
Incorrect. -b selects a boot, not a priority.
Try it yourself
An example you can run in a temporary verification environment.
journalctl --help | grep -E -- '-p|--priority' | head -n 1Expected result
priority filterのhelp行Key points
- -p selects priority
- err is a threshold
- Numeric priorities 0–3 are also usable
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.