大网数据广告活动
服务器运维问答

Why is my Linux console polluted with messages?

· 52CE 我爱测

I have Windows 10 Professional installed on a laptop with a 10th gen Intel i7 and 16 GB of RAM. I installed Hyper-V Manager and spun up a Rocky Linux 8 VM with no GUI. All went fine. But after the install completed and I performe…

问题原文

原帖链接 · Michael Buckman · CC BY-SA 4.0

I have Windows 10 Professional installed on a laptop with a 10th gen Intel i7 and 16 GB of RAM. I installed Hyper-V Manager and spun up a Rocky Linux 8 VM with no GUI. All went fine. But after the install completed and I performed a reboot, I noticed I was getting random messages flashing across the console. I could be right in the middle of typing something and a message will just insert itself. It makes for a polluted and messy experience. Below is a screenshot for reference.

Console Screenshot

The message in the screenshot is not the only type of message that has flashed across the console, but it is the only one I've been able to capture thus far. Would anyone have any idea where these messages might be coming from and how to "turn them off" so that I can get things done more easily?

已采纳解答

原帖链接 · Zoredache · CC BY-SA 4.0

Not sure what the default is on Rocky Linux, but there is a kernel configuration value kernel.printk that controls the level of alerts sent to the system console. You will want to adjust this. So people doing debugging want much higher levels of alerts. I am guessing you probably want something like your console alert value to be 3, or maybe 2.

I suggest a value of maybe kernel.printk = 3 4 1 3. On a Debian/Ubuntu system I make this persistent by writing a file like this that will be read when the system boots.

# more /etc/sysctl.d/printk.conf
# Uncomment the following to stop low-level messages on console
kernel.printk = 3 4 1 3

See an older question I asked over on unix.stackexchange for a description of the various levels and purpose of each value.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-10-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。