Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Somewhere in the past, I saw a linux box with real time dmesg terminal - i.e. you push Ctrl-Alt-F12 and a terminal with with fresh dmesg output pops out.

How can I reproduce such effect?

I know about the trick with watch command, but that's not the solution I'm thinking about.

share|improve this question
up vote 4 down vote accepted

You're going to need to edit your /etc/syslog.conf.

Adding a line like:

kern.*          /dev/tty10

Would output all kernel info to that tty. You'll need to figure out which tty is assigned to contol-alt-f12. There are many more examples in man syslog.conf.

share|improve this answer
Note that, on some Ubuntu, the base install has rsyslog in place of syslog, so that the config file is /etc/rsyslog.conf, with default configuration in /etc/rsyslog.d/50-default.conf (same syntax) – ofaurax Sep 3 '13 at 9:46

You need configure this in /etc/syslog.conf (or /etc/syslog-ng.conf depending on syslog version) directing kernel messages to /dev/vc/12 (for alt-ctrl-12).

If there is a log file already, a manual solution is to do something like:

tail -f /var/log/kernel.log > /dev/vc/12

But the permanent way is to set it up for your flavor of syslog

(in my archlinux install there is a predefined rule for this in /etc/syslog-ng.conf, uncommenting it would turn exactly this feature on)

share|improve this answer

Is this not what xconsole does in X11?
Otherwise you tail -f /dev/console. If I'm wrong here, and dmesg shows more than the console, then you need to look into syslogd.
Set your /etc/syslog.conf to either send kern messages to console, or to whichever stty is attached to the alt-ctrl-F12, which should be /dev/vc/12.
So that's /etc/syslog.conf:

kern.*  /dev/vc/12
share|improve this answer

You can simply run

cat /proc/kmsg

for realtime dmesg output in current terminal

share|improve this answer
What does this do? One or two line answers are generally not a good format at SU. – Doktoro Reichard Oct 12 '13 at 16:42

I think that you can configure your Linux to execute a Shell Script when you press some keys. For example for Gnome:

The shell script file will contain the dmesg command.

share|improve this answer
The point is, it wasn't a shortcut-induced dmesg invocation. It was a virtual terminal designated to the specific task of displaying kernel output, you couldn't modify it content in any way. – Mike Hordecki Aug 26 '09 at 17:30
OK, something similar to but instead a desktop background application something to launch with a keyboard shortcut – jangelfdez Aug 26 '09 at 17:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.