Install a DEB File in Linux - WindowsTips.net - Windows Tips and Tricks with Geek

Wednesday, January 12, 2022

Install a DEB File in Linux

 

How to Install DEB Files

You can install DEB files using both the graphical desktop (GUI) and the Terminal. We’ll go through both methods so that you can choose the one that looks easy.

Install DEB Files Graphically

Download the DEB package of the app you want to install. Let’s install Slack for this tutorial.

download slack and save the .deb file

After downloading, double-clicking on the file will load the contents of the package in Ubuntu Software, or whatever software manager your distribution uses.

Once it loads up, all you need to do is click on the “Install” button.

install slack from Ubuntu software center

If for some reason the software manager doesn’t open, you can install a package using GDebi or the dpkg command.

If you don’t have it already, open the terminal to begin installing GDebi.

open the terminal to install gdebi

Type the following command and hit enter.

sudo apt install gdebi

install gdebi using apt

Once installation is complete, head over to the location of the DEB package that you downloaded.

go to the DEB file location

If you’re using Ubuntu, right-click on the app package and click on “Open With Other Application.” Otherwise, look for another “Open With” option, or try double-clicking the file.

Find and click on GDebi Package Installer, and finally, click on select.

select GDebi package installer

The GDebi package installer will now open and retrieve the details of the package you want to install.

Install package button in GDebi

Finally, click on the “Install Package” button and give it some time to install.

GDebi installing Slack.deb

You should now see the application in the applications list.

slack in ubuntu applications

Install DEB Files in the Terminal

If you’re comfortable using the terminal, the dpkg (Debian Package) command can install DEB files for you. Here’s how to use it.

Open the terminal. Then cd into the directory where the downloaded DEB file resides. In our case, the file is in the \Downloads directory.

cd \Downloads

go to the directory

Type the dpkg command followed by the package name and hit Enter. Here’s an example.

sudo dpkg -i "package_name.deb"

Replace package_name.deb with the name of your package (but keep the quote marks), then hit Enter, and the installation should begin. You’ll probably be asked to enter the administrator password.

install the app using dpkg

Alternatively, you can go to the file location using the default file manager, type sudo dpkg -i, drag and drop the file into the terminal, and hit Enter to install it.

Whichever method you use with dpkg, we recommend checking that any necessary dependencies are installed before running the app. dpkg doesn’t check to make sure your system has everything it needs to run the program, but apt can do it for you.

sudo apt install -f

If anything is installed on your PC that needs additional dependencies, apt will help you install them. Then you’re free to run your program!

No comments:

Post a Comment