Skip to main content

Installing a DEB Package

Hands-On Lab


Photo of Michael Christian

Michael Christian

Course Development Director in Content





In this hands-on lab, we will install a DEB package on an Ubuntu system. On Debian-based Linux distributions, we can install deb packages using the dpkg command.

This gives us the hands on experience of installing and removing deb packages directly, without the use of a more comprehensive package manager like apt.

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 a DEB Package


In this hands-on lab, we will install a DEB package on an Ubuntu 16.04 system.

Connecting to the Lab

  1. Open your terminal application, and run the following command (remember to replace <PUBLIC_IP> with the public IP you were provided on the lab instructions page):
    ssh cloud_user@<PUBLIC_IP>
  2. Enter yes at the prompt.
  3. Enter your cloud_user password at the prompt.

Install the htop DEB

  1. List the current working directory.
  2. List the contents of /etc/issue.
    cat /etc/issue
  3. List the contents of the current directory.
  4. Run the following command to elevate permissions and install the DEB file (Note: If you receive a dpkg lock error, you can wait till the boot time scripts have finished, then proceed):
    sudo dpkg -i htop_2.0.2-1_amd64.deb
  5. Enter your cloud_user password at the prompt.

Run the htop Application

  1. Run the following command:
  2. Press Q to exit the application.

Remove the htop Package

  1. Run the following command:
    sudo dpkg --remove htop
  2. To check if the package was uninstalled, try running the command again:

    We should get a No such file or directory type of error.


Congratulations, you've successfully completed this hands-on lab!