Home / Linux / How to Check Logs with journalctl

How to Check Logs with journalctl

Use journalctl to read systemd logs, filter by service, follow logs live, and troubleshoot errors step by step.

Views: 19 Unique: 17 Updated: 2026-03-20

What this is

journalctl reads the systemd journal (system logs) on modern Linux servers.

What it is for

  • Troubleshoot failed services
  • See recent errors and warnings
  • Follow logs live while restarting services

Prerequisites

  • SSH access
  • Often needs sudo to see all logs

Step-by-step

View recent system logs

sudo journalctl -n 100 --no-pager

Filter by service (example: nginx)

sudo journalctl -u nginx -n 100 --no-pager

Follow logs live

sudo journalctl -u nginx -f

How to stop: Ctrl+C

Logs since boot

sudo journalctl -b --no-pager

Search for errors

sudo journalctl -p err -n 100 --no-pager

Final verification

Restart a service and watch logs:

sudo systemctl restart nginx
sudo journalctl -u nginx -n 30 --no-pager

Conclusion

journalctl is one of the fastest ways to understand why a service failed on a systemd server.

Back to category