I had a problem two weeks ago on March 28. At the time I didn't note the kernel version that was being used. How can I find out what kernel version I booted that day using journalctl -b
?
Ubuntu – How to see previous history (prior to this boot) in journalctl
bootkernelsystemd-journald
Related Question
- Ubuntu – How to repair a new kernel version and omit the “Previous Linux versions” from GRUB
- Ubuntu – Which kernel version to use if the latest has problems and what’s next
- Ubuntu – How to find previous boot log after Ubuntu 16.04+ restarts
- Ubuntu – How do you find out when a specific kernel version was last booted
- Ubuntu – Why is APT suggesting upgrading kernel 3.13 from 4.4.0 on trusty
Best Answer
On older installs
journalctl
doesn't keep boot historyFirstly only new installs will have boot history stored by
journalctl
as per this bug report. If you installed Ubuntu on or before January 2018, you need to turn on history for boot records. See this Q&A: Why does `journalctl --list-boots` only show the current boot?Use
--list-boots
to get boot numberjournalctl
references boot history by boot number. Use--list-boots
parameter and then use Home, End, PgUp PgDn or Up/Down arrow keys to scroll the list. When done press Q to quit:On the screen we see a boot on March 27th and then one on March 30th. So the boot we want is March 27th called boot number
-22
List your boot records
Today's boot is
-b
, previous boot is-b-1
, boot before that is-b-2
, etc. We will usejournalctl -b-22
to see the appropriate boot history:After the first few lines we see the Kernel version that was booted is:
4.14.23-041423-generic
. When done press Q to quit.More than kernel version is available
Of course there is alot more information in the logs available to you. If you wanted to know about say
lightdm
you could use:You might think "Mar 30" at the bottom is in error but it's a laptop that gets suspended and and still part of March 27, 2018 boot log.