Overview
Ubuntu works with .deb files, which are the Linux equivalent of .exe files in Windows. A .deb file is a package format commonly used in Linux distributions. It bundles all the essential components needed to install software, such as program files, setup scripts, and more, into a single file.
This article will explains how to install a .deb file in Ubuntu using 3 different methods.
Methods to Install .deb Files in Ubuntu
Let’s explore three different methods to install .deb files on an Ubuntu system. For demonstration purposes, we’ll download Google Chrome‘s .deb file from its official website.
1. Installing .deb Files by GUI
In the first method, we’ll install the .deb file using the GUI. First, navigate to the Downloads directory and locate the downloaded Chrome .deb file. Then, right-click on it and choose the Open With option. Finally, click on Software Install:
Next, click on the Install button to install Google Chrome on your system:
Afterward, enter your password to authenticate and begin the installation:
Finally, you can now use Google Chrome on your Ubuntu system. However, if you don’t want to use it for any reason, simply head to Software Center, locate Google Chrome, and click on the bin icon to uninstall it:
We’ve discussed the GUI method to install and uninstall Google Chrome via its .deb file in Ubuntu.
2. Installing .deb Files by Using apt Command
In the second method, we’ll install the Google Chrome .deb file using the apt command. Generally, the syntax for installing any software from its .deb file is as follows:
$ sudo apt install <path of the .deb file>
Let’s navigate to the directory where Google Chrome’s .deb file is located and run the apt install command to install it:
$ sudo apt install ./google-chrome-stable_current_amd64.deb
Finally, Google Chrome is installed in your Ubuntu system.
Now, if you want to uninstall it from your system, you can run the following apt remove command:
$ sudo apt remove google-chrome-stable
In this section, we’ve discussed the apt command method to install and uninstall google chrome from it’s .deb file.
3. Installing .deb Files by Using dpkg Command
In the last method, we’ll show you how to install a .deb file using the dpkg command, a tool for managing Debian packages in Ubuntu. We can install any software from its .deb file by executing the dpkg command with the -i flag, along with the address of the .deb file:
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
This will install Google Chrome on your system.
If you want to uninstall it, run the dpkg command with the -r flag:
$ sudo dpkg -r google-chrome-stable
Thus, we’ve learned about the dpkg method to install and uninstall Google Chrome from its .deb file.
Conclusion
Linux distributions commonly use a .deb file as a package format. It combines all the essential components for installing software, including program files, setup scripts, and more, into one file. We have explored, how to install a .deb file in Ubuntu via the GUI, apt install, and dpkg -i command in this article.
I’m Malaikah, a Digital Forensics and Cyber Security student and CEH certified, with a passion for writing about Linux and the tech world.