×

How to Install DEB Files in Ubuntu 22.04? – LinuxWays

How to Install DEB Files in Ubuntu 22.04? – LinuxWays


Ubuntu 22.04 has a comprehensive software center containing many software. This software can be installed conveniently by GUI (Graphical User Interface) just by searching for a software name. But if software is not available in the software center, then it can be installed by downloading packages from the official website of the Software Developer.

Software is usually available to download in the form of packages as compressed archives such as .deb, tar.gz, .rpm, etc. In order to extract and install these compressed archives, Package managers are used. This article demonstrates the installation of a .deb file by four different methods on Ubuntu 22.04 LTS.

Prerequisites

In order to follow this article, we will require

  • System with Ubuntu 22.04 LTS Installed.
  • A user account with sudo privileges.
  • Basic knowledge of command line usage.

What are DEB Files?

“.deb” is a software package format designed for Linux-based distributions like Ubuntu. Each “.deb” file is composed of two .tar archives: one for control information and another for installable data.

How to Install DEB Files in Ubuntu 22.04?

“.deb” files can be installed by both command line-based package managers as well as graphical package managers. In the following sections we will demonstrate four ways to install software:

  • Method 1: Using APT Package Manager
  • Method 2: Using DPKG Package Manager
  • Method 3: Ubuntu’s Software Center
  • Method 4: Using the GDEBI Package Manager

Method 1: Using APT Package Manager

“apt” or the Advanced Packaging Tool is the default package management tool for installing packages in Ubuntu. It checks and downloads all package dependencies automatically. In this section, we will download and install Sublime Text using the APT package manager using the following steps:

Step 1: Update System Repositories

It is recommended to update system repositories before installing any software as it avoids dependency issues. System repositories are updated by running the following command:

Step 2: Download Sublime Text .deb File

We can download the “.deb” file of Sublime Text from Sublime Text’s Official Website by clicking the “Download” button:

We will be redirected to the following page, where we can click the “direct downloads” button:

We will be redirected to the Downloads page, where Sublime Text is available in different formats of compressed archives. We will select “64-bit .deb”:

The “.deb” file will then be downloaded in the Downloads directory.

Step 3: Install Sublime Text

We will navigate to the “Downloads” directory by cd command:

From the above image, we can see that the sublime-text_build-4152_amd64.deb file is successfully downloaded. To install the “.deb” file, run the command:

$ sudo apt install ./sublime-text_build-4152_amd64.deb

Enter the sudo password to continue with the installation process. After a few seconds, Sublime Text will be installed.

Step 4: Verification of Installation

We can verify Sublime Text’s installation by launching via using Ubuntu Desktop’s file manager by clicking on the “Show Applications” button on the bottom left of the screen:

We can then type “Sublime Text” in the search bar and select Sublime Text Icon:

After pressing the Sublime Text Icon, Sublime Text will be launched:

Method 2: Using DPKG Package Manager

DPKG is the primary package manager for Linux-based distros like Ubuntu. It provides low-level package management, i.e., it does not check and install dependencies. In this section, we will download and install Google Chrome using the DPKG package manager by the following steps:

Step 1: Update System Repositories

We will start the installation of Google Chrome by first updating the system repositories in order to avoid dependency issues by running the following command:

Step 2: Download Google Chrome .deb File

We can download the “.deb” file of Google Chrome from Google Chrome’s Official Website by clicking the “Download” button:

We will be redirected to the following window, where we can select the “64-bit .deb (For Debian/Ubuntu)” option and press the “Accept and Install” button:

This will start downloading the “.deb” file. The .deb file will be downloaded in the “Downloads” directory.

Step 3: Install Google Chrome

We will navigate to the “Downloads” directory by cd command:

From the above image, we can see that the google-chrome-stable_current_amd64.deb file is successfully downloaded. To install Google Chrome, run the command:

$ sudo dpkg -i google-chrome-stable_current_amd64.deb

After a few seconds, Google Chrome will be installed.

Step 4: Verification of Installation

We can verify Google Chrome installation by launching it via Ubuntu Desktop’s file manager by clicking on the “Show Applications” button on the bottom left of the screen:

We can then type “Google Chrome” in the search bar and select Google Chrome Icon:

After pressing the Google Chrome Icon, Google Chrome Browser will be launched:

Method 3: Ubuntu’s Software Center

Downloading a DEB software package via Software Center is the most convenient and straightforward method as Software Center is a Graphical Package Manager. In this section, we will download and install Visual Studio Code by the following steps:

Step 1: Download Visual Studio Code .deb File

We can download the “.deb” file of Visual Studio Code from Visual Studio Code’s Official Website by clicking the “.deb” button:

The file will start downloading:

After a few seconds, the file will be downloaded in the “Downloads” directory.

Step 2: Install Visual Studio Code

Open the “Downloads” directory to access the “.deb” file:

We will right-click on the “.deb” file and select “Open With Other Application” from the menu list.

A pop-up window will be opened and we will select “Software Install” and press the “Select” button:

This will launch the Ubuntu Software Center and we will press the “Install” button:

We will be prompted for authentication. Enter the user password to continue with the installation:

The Installation will be done in a few seconds.

Step 3: Verification of Installation

We can verify Visual Studio Code’s installation by launching it via Ubuntu Desktop’s file manager by clicking on the “Show Applications” button on the bottom left of the screen. We can then type “Visual Studio Code” in the search bar and select Sublime Text Icon:

The below screenshot shows that the VSCode has been launched successfully:

Method 4: Using the GDEBI Package Manager

Gdebi installs local packages along with all the dependencies of the package. It is among the most reliable package installers. Gdebi has both command line and graphic options. In this section, we will download and install Any Desk application by the following steps:

Step 1: Update System Repositories

We will start the installation of Any Desk by first updating the system repositories. System repositories are updated in order to avoid dependency issues.

Step 2: Install GDEBI Package Manager

In Ubuntu 22.04, Gdebi is not installed by default. We will install gdebi by running the command below:

Step 3: Download AnyDesk’s .deb File

We can download the “.deb” file of AnyDesk from AnyDesk’s Official Website by selecting “Linux” and then by clicking the “Download Now”:

The “.deb” file will start to download and it will take a few seconds for it to get downloaded.

Step 4: Install Any Desk

Open the “Downloads” directory where the “.deb” package is stored.

Now we will right-click on the “.deb” file and select “Open With Other Application” from the menu list.

A pop-up window will be opened and we will select “GDebi Package Installer” and press the “Select” button:

This will launch Gdebi Package Installer and we will press the “Install Package” button to start installation:

We will be prompted for authentication. Enter the user password to continue with the installation:

The Installation will be done in a few seconds.

From the above image, we can see that Installation is successfully completed and “Any Desk” is installed.

Step 5: Verification of Installation

We can verify AnyDesk’s installation by launching it via Ubuntu Desktop’s file manager by clicking on the “Show Applications” button on the bottom left of the screen. We can then type “AnyDesk” in the search bar and select AnyDeskIcon:

Conclusion

“.deb” files can be installed by both command line-based package managers, e.g., apt and dpkg as well as graphical package managers, e.g., Ubuntu’s Software Center and gdebi. In order to install .deb files in apt and dpkg package managers in Ubuntu 22.04 LTS, we use “sudo apt install ./package.deb” and “sudo dpkg -i <package.deb>”. In this article, we demonstrated the installation of a .deb file by four different methods on Linux/Ubuntu 22.04 LTS.



Source link