journalctl chops lines longer then screen

How to disable the chopping of long lines when invoking

journalctl -b 

in order to see the whole journal message ?

E.g. the line get truncated:

Jul 09 20:47:57 myubuntu org.kde.kglobalaccel[1452]: Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adw>

1 Answer

This can be simply done by setting the SYSTEMD_LESS environment variable.

For instance setting SYSTEMD_LESS=FRXMK (that means S should not be in the set ) will show the message in a wrapped format.

This can be set in your .bashrc (export SYSTEMD_LESS=FRXMK) or directly in front of the journalctl command:

SYSTEMD_LESS=FRXMK journalctl -b

The output should now be wrapped:

Jul 09 20:47:57 myubuntu org.kde.kglobalaccel[1452]: Invalid Context= "Legacy" line for icon theme:
"/usr/share/icons/Adwaita/8x8/legacy/"

More about setting the SYSTEMD_LESS variable can be found in less(1) and journalctl(1).

From less(1) :

-S or --chop-long-lines

Causes lines longer than the screen width to be chopped (truncated) rather than wrapped. That is, the portion of a long line that does not fit in the screen width is not shown. The default is to wrap long lines; that is, display the remainder on the next line.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like