How to View Log Files Through Terminal

To access system logs and kernel messages in Ubuntu, you can use the `dmesg` command in the Terminal. This command retrieves messages from the kernel’s buffer, providing detailed information about system events. Open the terminal application using the ctrl+alt+t keys and run below command.

sudo dmesg

dmesg command

When you run this command, you’ll see an extensive list of messages. To make the output more manageable, you can use the less command to display a specific number of messages per screen:

sudo dmesg | less

dmesg less command

You can also filter messages by keyword using the grep command. For example, if you’re interested in messages containing the word “Bluetooth:” then use.

sudo dmesg | grep Bluetooth

dmesg filter output

This command filters the output to display only messages that contain the specified keyword, making it easier to identify relevant information.

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.

Also Read:  Tropy Research Photo Management Software

Leave a Reply