5

Where does Linux store the shutdown messages from last shutdown?

1
  • It doesn't. For Debian based distros (Ubuntu etc), see here for how to read them. Commented Aug 3, 2014 at 18:27

1 Answer 1

3

The shutdown messages you see on the screen may or may not have been logged. If they happen after the root filesystem is unmounted, they obviously can't be -- there's no where to save them at that point.

What there is could be anywhere (or nowhere) but usually you will find it in either /var/log/messages or /var/log/syslog. An easy way to do this, presuming the system has since been rebooted, is to look for the 0.000000 timestamp used by the kernel when it starts, and scroll back.

For example, if you load less /var/log/syslog and go to the end with CtrlEnd(if it says "Waiting...", give it a second or two then ctrl-c to stop waiting), you can search backward with ? and the pattern 0.000+]. There will be a long sequence of lines with that in it. Right before the first one you'll probably see to something to the effect that the system logger has started. The stuff right before that is from the last shutdown.

3
  • I do not have have the syslog file. If it matters, this is Fedora with systemd Commented Aug 3, 2014 at 19:01
  • You should have a /var/log/messages. You can create a /var/log/syslog to get a higher level of detail by adding *.* -/var/log/syslog to /etc/rsyslog.conf (under ## RULES ##) and restarting the logger, sudo systemctl restart rsyslog. Commented Aug 3, 2014 at 19:17
  • None of these files are where you say they are for me. I can not find /etc/rsyslog.conf, so do I just make it? Commented Aug 3, 2014 at 20:21

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.