/var/log/dmesg
was a useful boot time dmesg
dump. I can’t find that any more in Ubuntu 16.04. Is it somewhere else?
(/var/log/kern.log*
is limited; it catches kernel messages only after the logging daemon is running. Further is it cumbersome to find the right kern.log.X.gz file where the last boot happened. (It might have been rotated away, too.))
To show the output from the last boot, you can still use the command
dmesg
.However, Ubuntu 16.04 (in fact all Ubuntus >=15.04) use
systemd
which has a logging daemon,journald
and an interface with highly flexible access to logged data:journalctl
. You can see a log of the last boot equivalent todmesg
:From
journalctl
man page:all
dmesg
output in the last 2 hoursall of the journal since last boot
list boots in the journal
to set up persistent logging, you need to configure
journald
- by default its log is written non-persistently to/run/systemd/journal
(a binary file - no use trying to read it) and no data is available before the current boot. To set up persistent logging, edit the file/etc/systemd/journald.conf
and uncomment the line#Storage=auto
and changeauto
topersistent
. Use your favourite text editor orThen you must restart the service (or reboot)
Having enabled persistent logging, you will in future be able to use the full functionality of
journalctl
for example, to see information from the boot before the current oneSee the relevant page of the wonderful <3 Arch Wiki <3 for further tips and tricks on using
journalctl