Blog

Simple Guide: Installing .deb Files on Linux

1/19/2024 2 min read
Simple Guide: Installing .deb Files on Linux

Installing .deb Files on Linux via Terminal

If you use Linux, you've probably come across .deb files. These are installation packages for Debian-based distributions such as Ubuntu, Linux Mint, or Debian. They contain all the necessary components of a program—from executable files to configuration files.

In this tutorial, I'll show you step-by-step how to install a .deb file via the terminal. Don't worry: It's easier than it sounds.


What Are .deb Files?

.deb files are the Linux counterpart to .exe files on Windows.

The main difference:
Programs can have dependencies—additional packages or libraries required for the software to function properly. Usually, the package management system takes care of this automatically. However, when installing manually, these dependencies might need to be installed afterward.


Preparation

First, open a terminal window.

The terminal is a central tool in Linux, and all commands in this guide will be executed there.

Note:
There are also graphical package managers like the Software Center or Synaptic that allow you to install .deb files. This tutorial deliberately focuses on the command line as it works on all systems and provides more control.


Step 1: Install wget

With wget, you can download files directly from the internet. It is often already installed, but to be sure, run these commands:

sudo apt update
sudo apt install wget

Why wget? There are alternatives like curl, but wget is particularly simple for straightforward downloads.


Step 2: Download the .deb File

Now, let's download a .deb file. As an example, we'll use Google Chrome:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

⚠️ Security tip: Only download .deb files from trusted sources to avoid malware.


Step 3: Start Installation

After downloading, install the package using dpkg, the basic package management tool:

sudo dpkg -i google-chrome-stable_current_amd64.deb

You may see error messages about missing dependencies. This is normal and will be fixed in the next step.


Step 4: Fix Dependencies

If dependency problems are reported, you can automatically resolve them with the following command:

sudo apt -f install

-f stands for fix broken and ensures missing packages are installed.


Step 5: Verify Installation

Test launch the program via terminal:

google-chrome

Alternatively, find it in the application menu.

You can also check if the package is installed:

dpkg -l | grep google-chrome

Conclusion

Congratulations—you now know how to manually install .deb files.

You've learned about three crucial tools:

  • wget – for downloading files
  • dpkg – for installing .deb packages
  • apt – for resolving dependencies

Tip: Whenever possible, always use official package sources (repositories). There, you get automatic updates and clean dependency management. Only resort to .deb files when the software isn't available in the repository.

Have fun trying out new programs on Linux!