Disabling the flood of kernel messages in Debian console

本文提供了一种方法,通过编辑/etc/sysctl.conf文件,将所有低级内核消息设置为仅显示错误级别信息,从而避免在Debian系统控制台上出现过多消息。方法包括永久和临时两种方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

To disable permanently all low level kernel messages (iptables etc.) from flooding the console in Debian do the following changes:
(you must be root for these changes)

To make the changes permanent:
Edit the file /etc/sysctl.conf
add the following line:

kernel.printk = 4 1 1 7


The above changes will be effective at reboot or immediately using the following command:

/sbin/sysctl -p /etc/sysctl.conf


To make the changes only temporarily

echo "4 1 1 7" > /proc/sys/kernel/printk

and you can check the setting with

cat /proc/sys/kernel/printk

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值