When you use the command journalctl -p err -b
for example, you get an answer that ends with "END". What command do I use to end this and get the opportunity to enter the next command without having to close the window and open a new one?
erik@server ~ $ journalctl -p err -b
-- Logs begin at sön 2019-09-22 20:17:42 CEST, end at sön 2019-09-22 20:20:01 CE
sep 22 20:17:51 server iscsid[1289]: iSCSI daemon with pid=1290 started!
lines 1-2/2 (END)
A smooth way to end that command is to hit q (for quit). It looks like it is viewed with the viewer
less
.You can quit from this command and several other text mode programs with q. In this case and several other cases you can also quit with the ctrl C interrupt, but it is 'more brutal'.
Read
man journalctl
. In the Description section, it says:So, you should read
man less
to learn about this useful tool.One of the things you can learn from
man less
is:As mentioned in the other answers you can hit
q
to exit theless
pager.Assuming that the output is short, another option is to directly require the command not to use the pager. In the case of
journalctl
this is done with the option--no-pager
: