Debian / Ubuntu Record Boot Messages

By default, Debian and Ubuntu record boot messages to the system log. The system log is stored in the file /var/log/syslog and contains messages from the kernel and other system services.

To view the boot messages in Debian or Ubuntu, you can open a terminal window and type the following command:

$ dmesg

This will display the kernel ring buffer, which contains all the boot messages from the current session.

If you want to save the boot messages to a file, you can use the following command:

$ dmesg > boot.log

This will save the boot messages to a file called “boot.log” in the current directory.

If you want to view the boot messages from a previous session, you can use the following command:

$ less /var/log/syslog

This will display the system log file, which contains all the messages from previous sessions, including boot messages. You can use the arrow keys to scroll through the file, and the “q” key to exit the viewer.

Alternatively, you can use the following command to view the system log file in real-time:

$ tail -f /var/log/syslog

This will display the last few lines of the log file and continuously update the display as new messages are added. You can use the “Ctrl-C” key combination to exit the viewer.

By default, the system log file can become quite large over time, so it is a good idea to periodically rotate the log file to save disk space. This can be done automatically using logrotate, which is installed by default on most Debian and Ubuntu systems.

Leave a Comment