In Ubuntu 16/18 I would like to set unattended-upgrades to yes non-interactively.
I only know about dpkg-reconfigure unattended-upgrades
and it isn't.
Is this possible and how?
In Ubuntu 16/18 I would like to set unattended-upgrades to yes non-interactively.
I only know about dpkg-reconfigure unattended-upgrades
and it isn't.
Is this possible and how?
Check the file /etc/apt/apt.conf.d/20auto-upgrades
Look for the following line:
APT::Periodic::Unattended-Upgrade "1";
'1' means enabled, '0' means disabled. Edit the config file to the setting you want.
sudo EDITOR='sed -Ei "
s|unattended-upgrades/enable_auto_updates=.+|unattended-upgrades/enable_auto_updates=\"no\"|
"' dpkg-reconfigure -f editor unattended-upgrades
Related answer: How do you set a locale non-interactively on Debian/Ubuntu?