0/1 Lessons

Introduction to Linux Server Operating Systems

• 30min

0 / 3 lessons complete

Linux Server Installation and Lab Setup

• 23min

0 / 6 lessons complete

Working with the Linux Command Line Interface

• 1hr 30min

0 / 12 lessons complete

User and Group Management

• 44min

0 / 7 lessons complete

Linux Storage

• 30min

0 / 6 lessons complete

Linux Administration Basics

• 53min

0 / 8 lessons complete

Linux Networking

• 47min

0 / 8 lessons complete

Course Conclusion

• 5min

0 / 1 lessons complete


Q&A (0)

Notes (0)

Resources (0)

Saving Progress...


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.

Create note

 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.

ubuntu server sudo apt update
Ubuntu Server - sudo apt update command

apt list --upgradable: with this command you get a list of the updates (12) available through the APT package manager.

ubuntu server apt list upgradable
Ubuntu Server - apt list --upgradable command

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.

ubuntu server sudo apt upgrade
Ubuntu Server - sudo apt upgrade command

Configuring needrestart

With nano edit the file /etc/needrestart/needrestart.conf So we'll go ahead and press Enter.

ubuntu server nano needrestart.conf
Ubuntu Server - nano needrestart.conf file

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.

Ubuntu Server - Editing needrestart.conf file
  1. Delete the comment (#), so it's not commented out.
  2. Change this (i), which is interactive, as we can see here to (a), which is going to be automatic.
  3. Press Ctrl+X to exit this list.
  4. Press Y to save the changes.
  5. 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.

0 0 votes
Lesson Rating
Notify of
profile avatar
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments

profile avatar
2 months ago

Very nice course, well done!