Logo Questions Linux Laravel Mysql Ubuntu Git Menu

About to print KERNEL messages on terminal

According to manual page it told that if priority of message's log level is higher than default set log level then it will be printed on terminal. But when I had used sentence like


I am facing problem to print message on terminal. Because the default priority is set to 4 and KERN_ALERT has priority 1, which is higher.

So, how can I print message on terminal?

like image 972
Vikrant Avatar asked Mar 25 '23 12:03


1 Answers

It should print messages to the console, not to the terminal. Sometimes the console and the terminal seems the same, but it is not. Edit /proc/sys/kernel/printk to set up the lowest priority to print in console

like image 192
Federico Avatar answered Apr 02 '23 02:04