在 Debian 系统中,**“message 不更新”**这个说法比较模糊,我先按几种常见情况来解释,你看看是哪一种,或者直接告诉我具体现象。
从 Debian 8(Jessie) 开始:
/var/log/messages 可能不存在或不更新✅ 正确查看方式:
journalctl
journalctl -xe
journalctl -f
如果你确实需要 /var/log/messages,需要:
apt install rsyslog
systemctl enable --now rsyslog
apt update
apt-get update
检查:
cat /etc/apt/sources.list
例如:
可能原因:
检查:
systemctl --user status notification-daemon
dmesg -w
或:
journalctl -k -f
例如:
systemctl status xxx
一直显示旧状态
可尝试:
systemctl daemon-reexec
systemctl restart xxx
请告诉我:
cat /etc/debian_version)我可以直接给你针对性解决方案。