1. Using dmesg
One method would be to do so using
-n, --console-level level
Set the level at which logging of messages is done to the console.
The level is a level number or abbreviation of the level name.
For all supported levels see dmesg --help output.
$ sudo dmesg -n0
2. Using rsyslog
Another method would be through
rsyslog. The config file
Changing this line to this:
NOTE: A restart of
rsyslog is necessary,
sudo service rsyslog restart.
3. Using sysctl
Lastly you can control this at the kernel level via
I suggest you alter your
/etc/sysctl.conf. Specifically, you want to tweak the kernel.printk line.
# Uncomment the following to stop low-level messages on console
kernel.printk = 3 4 1 3
You can see your current settings:
$ sudo sysctl -a|grep "kernel.printk\b"
kernel.printk = 4 4 1 7
4. Using silent
If you truly want to disable all logging, even during boot then change the string
silent in the boot arguments to the kernel in GRUB, in
linux /vmlinuz-3.12.11-201.fc19.x86_64 ... rhgb silent ....