Updating and Configuring needrestart
Instructions
Q&A (0)
Notes (0)
Resources (0)
Saving Progress...
Resources
There are no resources for this lesson.
Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.
 In this lesson, I'm going to be showing you how to update your Ubuntu Server installation.
There are specific commands that we're going to use for updating Ubuntu.
Updating Ubuntu Server
sudo: elevates our permissions so that we're running our commands as a super user. It is going to prompt for my password because I'm running a command with elevated permissions.
sudo apt update: what this is going to do is update all of the lists of packages so that we know what are the latest versions available.
apt list --upgradable: with this command you get a list of the updates (12) available through the APT package manager.
sudo apt upgrade: this command is going to upgrade all of these packages that are listed here. Press Enter, and now type yes, and to continue press Enter.
Configuring needrestart
With nano edit the file /etc/needrestart/needrestart.conf So we'll go ahead and press Enter.
Inside this file, we're looking for the section of the script where we define whether or not this is going to be interactive or not, and, this is the restart mode. (l) is list only. (i) is interactive, which is what it is set to right now by default, and (a) is automatically restart, which is what we want to do.
- Delete the comment (#), so it's not commented out.
- Change this (i), which is interactive, as we can see here to (a), which is going to be automatic.
- Press Ctrl+X to exit this list.
- Press Y to save the changes.
- Press Enter to update that file.
All right, so that covers upgrading our Ubuntu Server installation and configuring needrestart so that we don't have to interactively select which service we want to restart. It'll just do it automatically.
So good job getting through this lecture. I look forward to seeing you in the next one.
Very nice course, well done!