Check out a free preview of the full Full Stack for Front-End Engineers, v3 course

The "Unattended Upgrades" Lesson is part of the full, Full Stack for Front-End Engineers, v3 course featured in this preview video. Here's what you'd learn in this lesson:

Jem quickly demonstrates how to keep applications up to date automatically using unattended-upgrades.

Preview
Close

Transcript from the "Unattended Upgrades" Lesson

[00:00:00]
>> So we understand permissions, we understand how to set firewalls. Next, we got to keep our applications up to date. One of the biggest source of hacks and breaches is people that just simply don't patch their systems. And it's kind of wild that, especially WordPress installations get hacked all the time and all people have to do is keep their stuff up to date, but it's really really easy to get.

[00:00:21]
And you know me I'm pretty lazy so I wanna do this as easy as possible, I want my system to do it for me. Fortunately if you're getting the kind of gist of Ubuntu there's always an apt package to do it for you. So we're gonna install unattended upgrades.

[00:00:40]
So that will allow the upgrades to run on the system at a periodic function and we don't do anything. It'll just do it automatically for us, we just have to configure it a little bit. So go ahead and try that out now. The package might already be installed depending on your flavor of Linux that you're using or Ubuntu.

[00:00:59]
But I like to double check. So it's sudo apt install unattended-upgrades. So hopefully you ran the sudo apt install unattended-upgrades. It may have been installed already. Save yourself from trouble. But let's go ahead and configure it. We want it to run at a low priority. That means we want it to happen in the background, whatever the system is not really doing too much.

[00:01:21]
So we're gonna use dpkg-reconfigure just to double check, So it does a nice friendly warning sign like applying updates on a frequent basis is important, blah, blah, blah, blah, just like we're saying, it's telling you the same thing. So it's saying automatically download install stable updates. So again more the LTS, which we talked about yesterday.

[00:01:43]
LTS stands for?
>> Long term support.
>> Long term support, that's right. So more on the line of these we never want it to automatically install bleeding edge things because they just haven't been that well tested. And when it comes to servers you want things that are well tested, cuz things that are not well tested tend to have more errors and bugs in them.

[00:02:00]
So we'll just say yes, And that's it. Pretty handy. Normally before we'd have to do some sort of cron job, which we'll talk about in the next section, what a cron job is. And it would have to do all this work we have configured but as these technologies advances as Ubuntu and APT advance it makes life a lot easier just like uncomplicated firewall.

[00:02:23]
So much better, we're living the dream these days.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now