journalctl used for in Linux?journalctl is a command-line tool to view and manage systemd logs on Linux systems. It helps you read system and service logs stored by systemd's journal.
journalctl?Use journalctl -r to display logs in reverse order, showing the newest entries first.
ssh.service?Use journalctl -u ssh.service to see logs only for the SSH service.
journalctl?Use journalctl -f to follow logs live, similar to tail -f.
journalctl output to logs from the current boot only?Use journalctl -b to show logs from the current boot session.
journalctl -r shows logs in reverse order, newest first.
nginx.service?-u filters logs by the specified service unit.
journalctl -f do?-f follows the log output live, like tail -f.
-b shows logs from the current boot only.
Running journalctl alone shows all logs stored in the journal.
journalctl to check logs for a specific service and follow them live.journalctl and why this might be useful.