Skip to main content

Installing and Managing Packages on Debian/Ubuntu Systems

Hands-On Lab

 

Photo of Terrence Cox

Terrence Cox

Senior Vice President of Content

Length

01:00:00

Difficulty

Beginner

Installation and removal of packages is a core skill for anyone managing Linux distributions. During this activity, the student will work with the package manager and installation utilities apt and dpkg to manage packages on Ubuntu/Debian Linux distributions.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Installing and Managing Packages on Debian/Ubuntu Systems

Introduction

Installation and removal of packages is a core skill for anyone managing Linux distributions. During this activity, the student will work with the package manager and installation utility apt to manage packages on Ubuntu/Debian Linux distributions.

You've been provisioned with an Ubuntu 16.04 LTS server and will need to install the Apache web server and wget on it. Log in to the system using the credentials provided on the hands-on lab page.

Install the Apache Web Server Package

Note: Ubuntu/Debian systems will usually start a service automatically, once its package is installed. You may need to update the package manager.

First, let's update our package information:

sudo apt update

Now we can install the packages:

sudo apt install apache2 wget

Verify the Server is Running and Capture the Result

The Apache web server should be running, but let's check:

curl http://localhost

If that's working, we use the wget package to capture the output of an http request. We'll point the output to a file in our home directory called local_index.response:

wget --output-document=local_index.response http://localhost

Conclusion

Congratulations, you have successfully completed this hands-on lab!