Suggestion for the Bookworm guide 'journalctl' section
gitbls opened this issue · 3 comments
I'd suggest adding a few journalctl aliases to section 5.1. These obviously aren't complete, but will help people move forward instead of reflexively installing rsyslog.
For example:
alias jc='journalctl --boot' #Pager journal of current boot
alias jca='journalctl' #Undecorated journalctl operates on all boots, not just current boot
alias jcf='journalctl --follow' #Follow end of journal
alias jcg='journalctl --boot --grep' #From current boot for specified message string
alias jcr='journalctl --list-boots' #List all the system boots
To look at the log from the previous boot, one would do sudo jc -1
. More generally, to look at the Nth previous boot, sudo jc -N
sudo does not work with aliases!
aliases are rarely a good idea, because they don't compose well with other commands.
In my youth I used to create shortcuts for myself like these, but eventually learned they were more trouble than they're worth.
journalctl has its own builtin shortcuts - journalctl -b
; journalctl -f
; that should be enough for almost anyone.
Ah, fair point. I guess I just exposed how I use journalctl. 🙄
Sorry guys but this one is not going to be implimented. Updates to this guide are bery low priority at least for the forseeable future.