I want to see the previous dmesg log before the reboot. In previous versions of fedora, It used to be in /var/log/messages. But from Fedora 20, it's being stored through systemd i.e. journalctl.

I've a directory /var/log/journal. It has many files and all of them having extension as .journal. I tried to open them with gedit. But couldn't succeed. I tried with notepad++. It's showing unreadable data as if a binary file. How to read them?


You are not supposed to read them. These are binary files. Only the tool "journalctl" with correct user permission can read them. Its a feature of "systemd". Any normal user can't read the system logs, unlike the traditional "syslog" system where any user can "cat" the "/var/log/messages" and see all the system logs.

  • 1
    Just a remark: Even in a 'traditional "syslog" system,' most log files in /var/log are normally only root-readable. Ubuntu is the only system I know of that has loosened these restrictions and allows non-root users read access to /var/log/syslog and probably /var/log/messages, for whatever reasons. – Dubu Jun 17 '15 at 9:16
  • The question isn't "should I" but "how do I." Your response would have been better left as a comment. – Stephan Jun 12 at 2:01

Borrowed from this answer:

journalctl --file, e. g. journalctl --file /path/to/some/file.journal

As indicated in the other answer, these logs are regularly rotated, and may not stretch back as far as you might hope.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.