Viewing logs in Fedora
Log files contain messages about the system, including the kernel, services, and applications running on it. There are different log files for different information. For example, there is a default system log file, a log file for security messages, and a log file for cron tasks.
Most log files are located in the
Rsyslog is a system utility that provides support for logging. To install the rsyslog package:
$ sudo dnf install rsyslog
To view a list of log files maintained by the related daemon,
rsyslogd, enter the following command:
$ less /etc/rsyslog.conf
In Fedora, there are two ways to open the log files:
The command line
A GUI application
You can use the command line to view logs in different ways, for example:
Using the journalctl command
Using the commands for viewing, for example cat, more, less, tail, or head
Combine the commands for viewing with the grep command
Using a text editor, for example,
To view all collected logs with no filter:
To view a specific log file, enter the journalctl command with a log filepath. The example command returns all logs of the kernel device node
$ journalctl /dev/sda
To view the boot logs, run the following command:
$ journalctl -k -b -1
For more information on journalctl, read the man page:
$ man journalctl
To view log files in GUI, use the
GNOME Logs application.
GNOME Logs is not installed by default, press the
Super key and type
Software. In the
Search field type
Logs and choose the
GNOME Logs item from the list of results and install the application.
GNOME Logs, you can filter for time periods, search within logs, and display categories.
To select a log file type, from the side bar of GNOME Logs, select the type to view.
To select a time period, from the menu bar, click Logs, and select a time period.
To search within logs, select a log file from the results pane.
Click the search icon.
Enter one or more search criterion in the search field.