« Back to Systemd: Frequently Asked Questions

How to see logging for a specific unit or service

This article has last been updated at .

How to see logging for a specific unit or service?

Use the journalctl command and filter the output by selecting a specific systemd unit.

journalctl --unit=UNIT

The journalctl command can show the events from its journal by --unit= followed by the service or its unit name. This way events will be filtered, making it much easier to troubleshoot a particular service.

Example

journalctl -u nginx.service

Learn more about journalctl

This article uses the journalctl command to achieve its tasks. For this popular tool there is a cheat sheet available!

» Mastering the tool: journalctl

journalctl

Other questions related to Systemd

Feedback

Small picture of Michael Boelen

This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution!

Mastodon icon

Related articles

Like to learn more? Here is a list of articles within the same category or having similar tags.