First, enable automatic updates like this:
sudo apt-get install unattended-upgrades
You then need to edit its configuration, type
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
(replace nano
with your preferred text editor if you want)
The file looks like this:
Unattended-Upgrade::Allowed-Origins {
"Ubuntu maverick-security";
// "Ubuntu maverick-updates";
};
The //
means this line is a comment and won't be considered by the program, remove the strokes to include stable release updates in addition to security fixes. Also, replace maverick
with the version of Ubuntu you're running.
To set the interval at which the system checks for updates, edit the /etc/apt/apt.conf.d/10periodic
file with a text editor:
APT::Periodic::Update-Package-Lists "14";
APT::Periodic::Download-Upgradeable-Packages "14";
APT::Periodic::AutocleanInterval "14";
APT::Periodic::Unattended-Upgrade "14";
In this example, the system is updated every two weeks.
For a more detailed explanation, see Automatic Updates in the Ubuntu server guide.
Note that papukaija's answer is talking about the interval at which the Update Manager dialogue pops up on your screen, I'm guessing that's not what you wan't, but I'm not sure. :)