Looking at logs for any errors or for documenting a baseline system is a great way to troubleshoot hardware, services, and applications. In this tutorial, we will be taking a look at journalctl and gnome logs for Fedora 33.
To view, all logs use the command
To view logs for a specific file path use the command journalctl /path/to/file. For example:
To look at the current boot use the following command:
To look at kernal logs use the -k option to see kernel logs from current boot use -b -k.
journalctl -b -k
View logs from a specific service. The Example below is used to view logs for ssh
sudo journalctl -b _SYSTEMD_UNIT=sshd.service
You can also use “+” to add another service to view. In the example below I will query for ssh and printer logs
journalctl -b _SYSTEMD_UNIT=sshd.service + _SYSTEMD_UNIT=cups.service
To view logs from a specific boot you can use the following commands
sudo journalctl --list-boots
sudo journalctl --boot=ID
Gnome logs are installed by default on ShellsTM using the Fedora 33 OS. It is much like journalctl but is a GUI based log viewer. You can locate and open it up by selecting Activities on the top right and typing logs in the search bar.
Once opened, you can navigate through different logs categories on the left side.
Gnome logs and journalctl is a good start to look for any service, software, hardware and security issues.