1

I run Ubuntu and Fedora on a day to day basis and usually run the package manager to check for updates nearly once a day.

When I get a kernel update I usually reboot, so that I'm running on the new kernel and I can see if there are any glitches (It's almost always fine).

If I add

apt-get update && apt-get -y upgrade

or

dnf check-update && dnf upgrade

to my root crontab is there anything procedurally wrong?

What if I set up crontab to do this at 4 a.m. and it installs a new kernel, then I don't reboot and it auto-installs a second new kernel. What if I don't reboot my Ubuntu box for a month and there have been 3 kernel updates and a couple of other patches to the same piece of software during this time?

Is it OK to enable automatic updating this way? I know that there's an 'unattended upgrades' utility for Ubuntu, but I'd rather learn what other system admins do and have a more 'hands on' approach to administering my PC's.

3

Generally, sysadmins with a mixed install base would use a cross-platform configuration management / orchestration system like Puppet, Chef, or Ansible to manage updates.

You could also set up one of those tools on a smaller scale if you like.

Or, on Fedora *, you can use DNF Automatic — see the Fedora page on configuring this. This is better than a simple cron script because it has better error handling and more options for output.

For Ubuntu, there are instructions on the community wiki for automatic updates, but I haven't used them so I can't comment more than to just provide the pointer.

* disclosure: I work on Fedora

  • Ah, I'm glad I asked before doing it my way! I will check out DNF Automatic and maybe install the Ubuntu equivalent. Not sure if it's worth bothering with config-management for two or three PC's but might do that some day. Question marked answered. Cheers! – bitofagoob Jan 2 '17 at 1:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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