journalctl - Query the systemd journal


To display all logs
$ journalctl

To display the new entries first in logs
$ journalctl -r

To display a specific number of log entries
$ journalctl -n 5

To retrieve log entries containing a specific keyword
$ journalctl | grep <keyword>
$ journalctl | grep nginx
$ journalctl | grep apache2

To display log entries based on their priority level
$ journalctl -p warning

To display verbose output
$ journalctl -o verbose

To view information about previous system boots
$ journalctl --list-boots

To print help options
$ journalctl --help



regards,
T.Dhanasekar