Linux 101 : Journalctl - investigating the boot process -


To display log messages for the most recent boot, we could use the below command:


To list the different recent boot logs by date and time, we use the following:


To limit the output of the above command to the last 5 entries, we could use the below:


We could then investigate each boot using the boot ID as below:


To see the kernel logs only - without including the applications logs -, we could use the below:


Remark:

When used without parameters, the above command lists all the systemd journal. 

To see the logs related to the apache service for example, we could use for example:


If we want to follow the logs "live" on the terminal, we use the below:


We could also display messages according to their priority.
The priority ranges from :


The "n" levels of priority:
  • emergency :   0
  • alert :             1
  • critical :         2
  • error :            3
  • warning :       4
  • notice :          5
  • information : 6
  • debug :          7

Comments

Leave as a comment:

Archive