Guides

Linux logging and debugging reference
Linux Guides

Journalctl Command Cheat Sheet

Analyze logs, filter errors, and debug services efficiently.

Basic Log View

journalctl

Service Logs

journalctl -u nginx

Real-time Logs

journalctl -u nginx -f

Error Details

journalctl -xe

Time Filter

journalctl --since "1 hour ago"

Boot Logs

journalctl -b

Real Use Cases

  • Service failed → journalctl -u
  • Live debug → -f
  • Error analysis → -xe

Common Mistakes

  • Checking full logs without filtering
  • Ignoring time range
  • Not using -u for services