Linux Tutorial: How to Show Realtime dmesg Output in Linux
Last Update: Mar 25, 2023
I wrote a book! Check out A Quick Guide to Coding with AI.
Become a super programmer!
Learn how to use Generative AI coding tools as a force multiplier for your career.
There are many times in Linux you want to watch your dmesg output, especially when working with hardware to see what’s going on.
There is actually a really easy to way to do this, simply open another terminal and type:
tail -f /var/log/messages
This will show you the last messages posted in realtime. This could go for any log you want actually, and works great.
Also some distrosl have “tailf” which does the same thing.
tailf /var/log/messages
Also you can pipe your kernel output to another terminal. Open /etc/syslog.conf and add the following line:
kern.* /dev/tty10
This allows you to switch to that terminal to see the kernel output.
I hope this helps!
Want to learn more about Linux? Of course you do. Check out this Linux Fundamentals course. You can sign up for a free trial here and take it today!