Ask Your Question

[Sticky] How do I view logs on Fedora?

asked 2011-12-28 18:13:38 +0000

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 18:28:16 +0000

this post is marked as community wiki

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

all logs files in fedora are store in /var/log

ls /var/log

The gnome-system-log or Gnome System Log viewer can be very useful tools to view system log files on Fedora Linux Desktop (Gnome Desktop).

Open Gnome System Log using command:

  1. Open the terminal on Linux Fedora desktop.

  2. Execute the su -c "yum install gnome-system-log"

  3. Execute gnome-system-log

the Gnome System Log viewer you enable you to view...

/var/log/cron - the cron log file
/var/log/messages - the messages log file
/var/log/secure - the secure log file
/var/log/Xorg.0.log - the Xorg.0.log log file

and much more ....

On 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

There's also the new gnome-logs package in Fedora that's a frontend to journalctl but it looks like it's only available in F21+

EDIT: @FranciscoD_ added F20+ specific information.

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? http://askubuntu.com/questions/58625/where-is-the-shutdown-log

Bucic ( 2014-02-08 16:44:18 +0000 )edit

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

FranciscoD_ ( 2014-02-09 04:00:07 +0000 )edit

Isn't var log messages a file?

hello ( 2014-11-14 01:06:03 +0000 )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 ( 2014-11-24 11:43:05 +0000 )edit

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

hello ( 2014-11-25 09:09:00 +0000 )edit

answered 2018-03-07 15:48:52 +0000

florian gravatar image

updated 2018-03-07 15:51:55 +0000

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 07:00:32 +0000

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) http://0pointer.de/blog/projects/the-...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2011-12-28 18:13:38 +0000

Seen: 89,958 times

Last updated: Mar 07