Arthur Ulfeldt Asked: 2010-05-19 12:37:51 +0800 CST2010-05-19 12:37:51 +0800 CST 2010-05-19 12:37:51 +0800 CST How can I make Ubuntu server always install updates without asking? 772 I would like to set some Ubuntu Server VM's to always pull updates (nightly) with out asking? ubuntu automation update 3 Answers Voted Florian Diesch 2010-05-19T13:13:03+08:002010-05-19T13:13:03+08:00 Have a look at cron-apt cpbills 2010-05-19T12:46:58+08:002010-05-19T12:46:58+08:00 i wouldn't recommend unattended updates, but you can do something like this: create a file... update.sh for example, throw it in /usr/local/sbin/ #!/bin/sh apt-get update apt-get -y dist-upgrade run chmod 700 /usr/local/sbin/update.sh and chown root.root /usr/local/sbin/update.sh then in root's crontab, add a line: 15 03 * * * /usr/local/sbin/update.sh this will kick off your apt-get update and apt-get -y dist-upgrade every night at 3:15am or just: 15 03 * * * /usr/sbin/apt-get update && /usr/sbin/apt-get -y dist-upgrade in root's crontab sudo crontab -e to edit it. if you want to download only: 15 03 * * * /usr/sbin/apt-get update && /usr/sbin/apt-get -yd dist-upgrade user9517 2010-05-19T12:50:41+08:002010-05-19T12:50:41+08:00 There is an article here that will tell you how to disable the update pop-up. You then need to run apt-get update apt-get -y upgrade from root's crontab
Have a look at cron-apt
i wouldn't recommend unattended updates, but you can do something like this:
create a file...
update.sh
for example, throw it in/usr/local/sbin/
run
chmod 700 /usr/local/sbin/update.sh
andchown root.root /usr/local/sbin/update.sh
then in root's crontab, add a line:
this will kick off your
apt-get update
andapt-get -y dist-upgrade
every night at 3:15amor just:
in root's crontab
sudo crontab -e
to edit it.if you want to download only:
There is an article here that will tell you how to disable the update pop-up.
You then need to run
from root's crontab