Pages

How To Install Automatic Updates Automatically In Ubuntu

Just a few days ago, a user of the blog asked me how it was possible to enable the automatic installation of updates for Ubuntu, without user intervention . In the past there I signaled that it was possible to automatically update the latest security updates and now we shall see how to install all updates in a totally automated . To update your system with the latest software is a good practice, however, not everyone can keep up with this routine. In fact, on Windows, the automatic update is enabled by default.

This short tutorial will show you how to enable automatic software updates and packages in Ubuntu. In this way, you will not need to remember to update the system and all updates are automatically downloaded and installed when the PC is connected to the Internet . This is a great way to make sure that all security patches and software enhancements are automatically installed on your system.

Open the terminal and type:

sudo apt-get install unattended-upgrades

Now type:

sudo gedit / etc/apt/apt.conf.d/10periodic

Edit the file contents to the text shown below:

APT:: Periodic:: Enable "1" 
APT:: Periodic:: Update-Package-Lists "1" 
APT:: Periodic:: Download-Upgradeable-Packages "1" 
APT:: Periodic:: AutocleanInterval "5 " 
APT:: Periodic:: Unattended-Upgrade "1" 
APT:: Periodic:: RandomSleep "1800";

Now, type in terminal:

sudo gedit / etc/apt/apt.conf.d/50unattended-upgrades

and edit the contents of the file with the following code:

Unattended-Upgrade:: Allowed-Origins { 
"} $ {distro_id stable", 
"$ {} $ {distro_id distro_codename-security}" 
"$ {} $ {distro_id distro_codename}-updates", 
/ / "$ {} distro_id $ {} distro_codename-proposed ", 
/ / "$ {} $ {distro_id distro_codename}-backports";

};

Unattended-Upgrade:: Remove-unused-Dependencies "true";

Now install cron-apt:

sudo apt-get install cron-apt

His edit the configuration file:

sudo nano / etc / cron.d / cron-apt

And now edit the file according to your needs!

Previous Post Next Post