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
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
|Category||Requirements, Conventions or Software Version Used|
|System||Ubuntu 22.04 Jammy Jellyfish|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
A word of 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
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
- Using the
dpkgcommand 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.debwith the name of your package:
$ sudo dpkg -i example.deb
- If the package requires dependencies that aren’t already on your system, you will see this error in the terminal:
dpkg: error processing package
- 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
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.
gdebicommand may not be available on your system by default, so you will have to install the
gdebi-coresoftware package in order to access it. Use these commands to install
$ sudo apt update $ sudo apt install gdebi-core
- Now that the
gdebicommand is available, use it to install your package by executing this command:
$ sudo gdebi example.deb
gdebiwill prompt you to ask whether or not to install the file, just enter
yfor ‘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:
- The first thing we need to do is make sure that the
gdebisoftware package is installed.
$ sudo apt update $ sudo apt install gdebi
- 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 Applicationand from there choose the
GDebi Package Installeroption.
- The next window will give you a little information about what you aree installing. Click the
Installbutton to continue.
- Installing software always requires root permissions. Enter your password to proceed with the installation.
- The DEB file is now installed on your system. As you can see, the
Installbutton has been replaced with a
Removebutton, which you can use later in case you need to uninstall the software.
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.