Install DEB file on Ubuntu 22.04 Jammy Jellyfish Linux

A file that has the .DEB file extension is a Debian software package file. They contain software to be installed on Debian or a Debian based operating system. Ubuntu 22.04 Jammy Jellyfish falls into that category, being based on Debian and capable of executing .DEB files.

In this tutorial, we will go over the steps to install a DEB file on Ubuntu 22.04 Jammy Jellyfish and talk about some best practices along the way.

In this tutorial you will learn:

  • DEB file security and searching Ubuntu’s package repository
  • How to intall DEB files with dpkg
  • How to install DEB files with apt
  • How to install DEB files with gdebi
  • How to install DEB files via GUI
Install DEB file on Ubuntu 22.04 Jammy Jellyfish
Install DEB file on Ubuntu 22.04 Jammy Jellyfish
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software dpkg, gdebi
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

A word of warning



WARNING
Before you jump into installing a DEB file on your system, you should know that installing software from third party sources can have a negative impact on the stability and security of your Ubuntu system. Only install DEB files if you’re confident about the source of the file and can verify its integrity.

One of the great things about Ubuntu and other flavors of Linux is that they have a myriad of stable, tested, and secure software available in their software repositories, only a short download away. Before installing a DEB file, you should check Ubuntu’s repository first to see if the software is already available from there.

To search Ubuntu’s package repository for a package, open a command line terminal and type the following command:

$ apt search SOME-KEYWORD
apt search shows that net-tools package is available for download from the repo
apt search shows that net-tools package is available for download from the repo

If you see the desired package within the output returned from apt, take note of the package’s name and install it with these commands:

$ sudo apt update
$ sudo apt install PACKAGE-NAME

Install DEB file using dpkg

  1. Using the dpkg command is the first method we willll go over for installing DEB packages and is also probably the most common. Run the command like this, while replacing example.deb with the name of your package:
    $ sudo dpkg -i example.deb
    
    Using dpkg to install DEB file
    Using dpkg to install DEB file
  2. If the package requires dependencies that aren’t already on your system, you will see this error in the terminal:


    dpkg: error processing package
    
  3. Don’t fret, because we can install the required dependencies with a single command, assuming that they are available in Ubuntu’s package repository. Just run this command to install the dependencies:
    $ sudo apt install -f
    

Install DEB file using apt

It is also possible to use the built in apt command to install a DEB file on Ubuntu 22.04. apt is just a front end for dpkg, so the process under the hood is identical. Still, this method may be preferred by some users who are more familiar with the apt command already.

$ sudo apt install example.deb

Install DEB file using gdebi

Using the gdebi command to install DEB packages is even better than dpkg because it will automatically download and install any required dependencies, while of course installing the DEB file itself.

  1. The gdebi command may not be available on your system by default, so you will have to install the gdebi-core software package in order to access it. Use these commands to install gdebi-core:
    $ sudo apt update
    $ sudo apt install gdebi-core
    
  2. Now that the gdebi command is available, use it to install your package by executing this command:
    $ sudo gdebi example.deb
    
  3. gdebi will prompt you to ask whether or not to install the file, just enter y for ‘yes’ and allow the installation proceed.

Install DEB file via GUI




If you prefer to use the GUI instead of command line, this section is for you. Follow these steps to install a DEB file on your Ubuntu 22.04 system via GUI:

  1. The first thing we need to do is make sure that the gdebi software package is installed.
    $ sudo apt update
    $ sudo apt install gdebi
    
  2. Next, right click on the DEB file you wish to install and select Open With Software Install. If this option does not appear for you, then click Open With Other Application and from there choose the GDebi Package Installer option.
    Open the DEB file With Software Install
    Open the DEB file With Software Install
  3. The next window will give you a little information about what you aree installing. Click the Install button to continue.
    Click install to proceed
    Click install to proceed
  4. Installing software always requires root permissions. Enter your password to proceed with the installation.
    Authenticate with your username and password to proceed with the install
    Authenticate with your username and password to proceed with the install
  5. The DEB file is now installed on your system. As you can see, the Install button has been replaced with a Remove button, which you can use later in case you need to uninstall the software.
    DEB file successfully installed
    DEB file successfully installed


Closing Thoughts

In this tutorial, we learned how to install DEB file packages on Ubuntu 22.04 Jammy Jellyfish. We covered three different command line options for the installation, as well as a GUI alternative.

We also learned of the potential dangers that lie with DEB files, and how to search Ubuntu’s repository as a preferred installation source. Now that you know how to install DEB files, stay safe by only installing them from sources you trust.