How to install .deb file in Ubuntu: Step by step guide

This guide will provide a comprehensive, step-by-step process on how to install .deb file in Ubuntu, ensuring even users new to linux can follow along with ease. We’ll also cover essential commands and alternative methods to simplify the process.

What is a .deb file?

A .deb file is a software package in a format designed for Debian-based distributions. It contains all files needed to install software on a Debian-based operating system such as Ubuntu, Linux Mint, or Kali Linux. These software package includes everything needed to configure and run the software; they can be downloaded directly from official repositories.

Prerequisites

Before proceeding with installing a .deb file in Ubuntu, there are a few essential requirements and tools you need to ensure a smooth process.

  1. System Requirements:
  • A running instance of Ubuntu (desktop or server).
  • Adequate storage space to accommodate the software package.
  • An active internet connection.
  1. Installed Ubuntu: Ubuntu 22.04 LTS (Jammy Jellyfish) Ensure this is your version, or one supported. Always update your Ubuntu system by using the following commands:
sudo apt update && sudo apt upgrade

3. Permissions / Tools Required: 

  • Superuser access: Make sure that you have sudo access or log in as a root user to install .deb files since this involves system-level operations. 
  • Terminal (command-line interface): Although some methods are graphical (i.e require Graphical User Interface), others require the use of the terminal.
  • GDebi (optional): A light package installer for *.deb files. It has the advantage of offering convenience, especially concerning resolving dependencies automatically.

How to Install .deb file in Ubuntu 22.04 

How to Install a .deb file on Ubuntu Using Ubuntu Software Center

The Ubuntu Software Center is one of the easiest ways to install deb file Ubuntu through the graphical interface. Follow the steps below for the installation:

Step 1: Downloading the .deb file

Download the file through your browser. Locate the Ubuntu install deb file. Typically, this file will be in your Downloads directory and the file should have the .deb extension. 

Step 2: Open the File with Software Install

Once downloaded, find the folder where the .deb has been saved. Right-click the file and select Open with Another Application. From the list, select Software Install which might be labelled as Software Center.

Step 3: Installing the Package

Clicking Software Install will open the Software Center with package information. Click the Install button. You may be asked to authenticate with your password and confirm the installation. Once installed, the software is ready to use

How to install deb file in Ubuntu Using GDebi Package Installer

The GDebi package installer is a lightweight, alternative graphical tool for installing local deb packages. One of its advantages is that it identifies all necessary dependencies and automatically installs them using the apt package manager.

Step 1: Installing GDebi

First, you need to install GDebi if it’s not already installed. Use the following command in the terminal:

sudo apt install gdebi -y

Step 2: Installing the .deb File with GDebi

Once GDebi is installed, go to your .deb file in the file manager. Right click on the file and select Open with Other Application. Check the box next to GDebi Package Installer and click Select. Click on the Install Package button, enter user password when prompted and GDebi will take care of the rest for installation along with its dependencies.

How to Install .deb File in Ubuntu Command Line Using dpkg

For more control over the installation process, the dpkg (Debian Package Manager) command allows installing, deleting, and building packages. Here’s how to install deb file in Ubuntu using this method:

Step 1: Install with dpkg Command

Use the dpkg command to install the .deb file

sudo dpkg -i <package_path>.deb

Make sure to replace “package_path.deb” with the actual file name. Enter the user password and wait for the installation to complete.

Step 2: Resolve Dependencies (if Necessary)

If the installation fails due to missing dependencies, you can manually resolve the them by running the following command:

sudo apt --fix-broken install

This will automatically install any missing dependencies and complete the installation.

How to Install a deb File in Ubuntu Using apt Command

Another method to install deb file on Ubuntu is through the apt package manager, which is commonly used for handling package installations and dependencies.

Step 1: Installing the .deb File Using apt

Run the following command to install the .deb file using apt:

sudo apt install <package path>

When prompted, provide the user’s password. The apt command will automatically resolve any missing dependencies during the installation.

Step 2: Verify the Installation

To confirm that the installation was successful, you can use the dpkg command:

dpkg -l | grep <package path> 

Conclusion

Installing .deb files in Ubuntu can be done in several ways, either through the Software Center for a simple Graphical User Interface, or via terminal-based methods like dpkg and apt for those who prefer more control. For users that require an additional layer of convenience, GDebi is an excellent option that resolves dependencies automatically. Follow this step-by-step guide, and no issue will be faced to manage your Ubuntu system and install the software efficiently.

About The Author
Liutauras is the Head of Customer Support Team with five years of experience in the fast-paced cloud hosting industry. With a strong passion for software engineering and cloud computing, he continuously strives to expand his technical expertise while prioritizing client satisfaction. Liutauras is committed to proactive support and providing valuable insights to help clients maximize their cloud environments.
Subscribe to our newsletter