How to View System Logs in Ubuntu?

Troubleshooting an Ubuntu system often requires analyzing system logs to identify errors, hardware faults, or application crashes. This guide provides a quick overview of the essential tools and commands needed to view and monitor these logs. You will learn how to use journald for systemd logs, navigate traditional log files in the /var/log directory, and utilize graphical tools for a more user-friendly troubleshooting experience.

Using journalctl for Systemd Logs

Modern versions of Ubuntu use systemd to manage system services, which records logs in a centralized, binary format managed by journald. The primary tool to access these logs is the journalctl command.

While journalctl handles systemd services, many traditional applications and system components still write plain-text files to the /var/log directory. You can navigate this directory using standard terminal commands like cd /var/log and view files using cat, less, grep, or tail.

Graphical Log Viewers

If you prefer a graphical user interface (GUI) over the command line, Ubuntu includes a built-in application called Logs (or gnome-logs).

You can launch this application by opening your Ubuntu Activities overview and searching for “Logs”. The interface categorizes messages into sections such as “Important”, “Applications”, “System”, and “Hardware”. This allows you to click through events, search for specific keywords, and view detailed error reports without typing a single terminal command.