[systemd-devel] Make journalctl start at the end of the journal by default

Lennart Poettering lennart at poettering.net
Mon Aug 18 07:42:52 PDT 2014

On Mon, 18.08.14 17:19, Philippe De Swert (philippedeswert at gmail.com) wrote:

> > Moreover, journalctl is frequently now used in scripts, we cannot change
> > the defaults really now, that would break all scripts. journalctl is API now.
> I could argue that most people who use -b might not know about -e, or
> that scripts would not use default journalctl behaviour. (I actually
> included a -s option in the patch to have journalctl with the old
> behaviour) But this will only degrade in a personal preferences game I
> guess.
> > I'd recommend to simple set a shell alias to map "journalctl" to
> > "journalctl -e" if that's what you prefer. That way you maintain API
> > compatibility while simplifying what you have to type the way you
> > prefer. (Actually, you could even map "j" to "journalctl -e", making
> > things even easier to type).
> I did explain I knew what aliases were and why they would not work.
> Constantly changing environment, needing to make sure something does not
> magically work on one device due to aliases and not on another etc...

I think it might make sense to maybe file bugs against a number of
distros, asking them to maybe set the alias by default, the way many
distros set shorter aliases by default for some "ls" invocations.

We could maybe even ship something like that in systemd upstream, but
afaik there's no standard place we could hook that into bash. 

    alias jb='journalctl -b'
    alias je='journalctl -e'

Doesn't sound too terrible for me to have as suggested default

> >> And also I would like to see the full logs always by default.
> >> Usually after lots of searching you find the offending log entry for
> >> the error, only to find out you forgot to pass the right command
> >> line options to journalctl and the important bit is cut off.
> > 
> > cut off? You can just scroll to the right in most pagers, such as less?
> Good luck doing that when you don't have arrow keys available. Moreover
> I still believe wrapping would be more useful. But personal preferences
> again I guess.

I am pretty sure doing the auto-paging thing (the same way as git, and
others do it) improves end-user experience for most people. I mean, I
think having arrow keys is the common case. Not having them is the rare


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list