How to disable logging to /var/log/kern.log

Depending on what your objective is and why you are trying to do this actually doing it may not be the best solution. However it will disable logging if you don't want it for some reason or it's filling up your disk.

To disable logging:

sudo nano /etc/rsyslog.conf

Search for 'imklog' and comment out the line that looks like this:

module(load="imklog" permitnonkernelfacility="on")

So change this to:

# module(load="imklog" permitnonkernelfacility="on")

Or it might look like this:

$ModLoad imklog # provides kernel logging support

Change to:

# $ModLoad imklog # provides kernel logging support