Debian 的 message(消息/提示)不更新,通常不是单一原因,而是取决于你指的是哪一类 message。下面按最常见的几种情况给你排查思路。
Debian 登录时显示的欢迎信息(message of the day)由 pam_motd + systemd 控制。
cat /etc/motd
如果内容是固定的,那它本来就不会自动更新。
✅ 正确做法:
sudo rm /etc/motd
sudo systemctl enable motd-news.timer
sudo systemctl start motd-news.timer
Debian 会自动从:
https://motd.debian.org/
获取最新 motd。
检查:
grep pam_motd /etc/pam.d/login
grep pam_motd /etc/pam.d/sshd
如果没有类似:
session optional pam_motd.so
说明 motd 被关闭了。
systemctl list-timers
如果没有 motd-news.timer,说明不会自动更新。
sudo apt update
Debian 不会自动更新软件包索引(除非你配置了 unattended-upgrades)。
检查:
apt list --installed | grep unattended-upgrades
启用:
sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades
systemctl status systemd-journald
查看日志:
journalctl -f
journalctl --disk-usage
清理:
sudo journalctl --vacuum-size=100M
Debian 不会主动推送消息,需要你订阅:
Debian 默认是“你不动,它不更”
不自动更新 motd、不自动更新软件、不自动弹窗提醒。
请告诉我你指的是哪一种:
apt 提示有更新但没出现?我可以直接给你针对你系统的解决方案。