Ask Your Question

[Sticky] How do I view logs on Fedora?

asked 2011-12-28 12:13:38 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

How do I access logs and other diagnostic data? I'd like to know about both command line tools and GUI applications.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2011-12-28 12:28:16 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

logs files in fedora are stored in /var/log

ls /var/log

The Gnome Logs application (gnome-logs) can be very useful tools to view system log files on Fedora's Gnome Desktop.

Since Fedora 20, we use journalctl by default. Regular files such as /var/log/messages are no longer available by default. Of course, you can install rsyslog and journalctl will generate them for you if you want. journalctl itself has many many options. For example, you can filter the log based on different criteria. You can view the current or previous boot logs using the -b flag. Here are some examples from man journalctl (Please read the man page for more detailed information on the available options):

Without arguments, all collected logs are shown unfiltered:


With one match specified, all entries with a field matching the expression are shown:

journalctl _SYSTEMD_UNIT=avahi-daemon.service

If two different fields are matched, only entries matching both expressions at the same time are shown:

journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097

If two matches refer to the same field, all entries matching either expression are shown:

journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service

If the separator "+" is used, two expressions may be combined in a logical OR. The following will show all messages from the Avahi service process with the PID 28097 plus all messages from the D-Bus service (from any of its processes):

journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service

Show all logs generated by the D-Bus executable:

journalctl /usr/bin/dbus-daemon

Show all logs of the kernel device node /dev/sda:

journalctl /dev/sda

Show all kernel logs from previous boot:

journalctl -k -b -1
edit flag offensive delete link more



The answer is not valid anymore as there is no /var/log/messages directory in Fedora 20. Also, could anyone supplement the answer with information on how to view a log of a recent shutdown/ troubleshoot shutdown issues?

Bucic gravatar imageBucic ( 2014-02-08 10:44:18 -0500 )edit

@Bucic: I've updated the answer. Hope that's enough.

FranciscoD_ gravatar imageFranciscoD_ ( 2014-02-08 22:00:07 -0500 )edit

Isn't var log messages a file?

abadrinath gravatar imageabadrinath ( 2014-11-13 19:06:03 -0500 )edit

Thanks for the info on journalctl. I still can't find the Xorg logs. From your example I would assume it's something like journalctl /usr/bin/Xorg, but this comes up empty.

matth45 gravatar imagematth45 ( 2014-11-24 05:43:05 -0500 )edit

OK... see if there are logs. ls -lrt /var/log/Xorg.*, also check the dates. If there are files, then just cat them.

abadrinath gravatar imageabadrinath ( 2014-11-25 03:09:00 -0500 )edit

answered 2018-03-07 09:48:52 -0500

florian gravatar image

updated 2018-03-07 09:51:55 -0500

One easy and very convenient way is to use the Gnome app gnome-logs. It allows to filter for time periods, search within logs, display certain categories.

edit flag offensive delete link more

answered 2018-03-08 01:00:32 -0500

You are looking for the traditional text log files in /var/log, and they are gone?

Here's an explanation on what's going on:

You are running a systemd-based OS where traditional syslog has been replaced with the Journal. The journal stores the same (and more) information as classic syslog. To make use of the journal and access the collected log data simply invoke "journalctl", which will output the logs in the identical text-based format the syslog files in /var/log used to be. For further details, please refer to journalctl(1).

Alternatively, consider installing one of the traditional syslog implementations available for your distribution, which will generate the classic log files for you. Syslog implementations such as syslog-ng or rsyslog may be installed side-by-side with the journal and will continue to function the way they always did.

Thank you!

Further reading: man:journalctl(1) man:systemd-journald.service(8) man:journald.conf(5)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2011-12-28 12:13:38 -0500

Seen: 105,743 times

Last updated: Apr 27 '18