Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assume I need to write a cron job to automate the installation of security update daily, which command I should use for better reliability?

share|improve this question
up vote 2 down vote accepted

You don't need a cron job to install security update. unattended-upgrade do it for you, automatically. From its description in pkg on Ubuntu 12.04

 This package can download and install security upgrades automatically
 and unattended, taking care to only install packages from the
 configured APT source, and checking for dpkg prompts about
 configuration file changes.

you just need install it, then

dpkg-reconfigure unattended-upgrades 

then, choose "YES" and let it do its jobs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.