在 Ubuntu 里没有叫 “Ubuntu Trigger” 的官方标准组件,所以“禁用”要分情况。下面把最常见的几种可能都列出来,你对照一下是哪一种。
很多“trigger”其实是 systemd timer。
查看所有 timer:
systemctl list-timers --all
禁用某个 timer(例如 apt-daily.timer):
sudo systemctl disable --now apt-daily.timer
sudo systemctl disable --now apt-daily-upgrade.timer
彻底屏蔽(防止被其他服务唤醒):
sudo systemctl mask apt-daily.timer
查看 cron:
crontab -l
sudo crontab -l
编辑:
crontab -e
sudo crontab -e
删除或注释掉对应的 trigger 行即可。
Ubuntu 的自动更新由以下服务控制:
sudo systemctl disable --now apt-daily.timer
sudo systemctl disable --now apt-daily-upgrade.timer
或彻底关闭自动更新:
sudo apt remove unattended-upgrades
GNOME 设置里:
gnome-control-center
命令行示例:
gsettings set org.gnome.desktop.screensaver lock-enabled false
例如:
sudo systemctl disable --now triggerhappy.service
请执行:
systemctl list-units --type=trigger --all
或
grep -R "trigger" /etc/systemd /etc/cron* ~/.config/systemd
然后把输出或截图发给我,我可以直接告诉你精确禁用命令。
Ubuntu 没有统一的 “Ubuntu Trigger”,通常是 systemd timer、cron、自动更新或某个服务。
找到具体名字后,用systemctl disable --now xxx.timer即可禁用。
如果你能告诉我:
我可以给你一步到位的命令。