How to Install a .deb File in Ubuntu

The Local Payload Vector

While the `apt` command is the standard method for installing software directly from Canonical’s official repositories, many commercial software vendors (like Google for Chrome, or Microsoft for VS Code) distribute their Linux applications as standalone, pre-compiled installation files ending in `.deb`. Because these files are downloaded directly from the internet and exist entirely outside the official ecosystem, you cannot install them using the standard repository update commands. You must utilize a dedicated, lower-level package manager to unpack the payload.

How to Install a .deb File

The Ubuntu operating system utilizes the underlying Debian Package manager (`dpkg`) to execute these localized, offline installations.

1. Open your terminal application.
2. You must first navigate to the directory where you downloaded the `.deb` file. Usually, this is your Downloads folder. Execute the following command:

cd ~/Downloads

3. Verify the Payload: Type `ls -l` and press Enter to list the files in the directory. Ensure you can clearly see the target file (e.g., `google-chrome-stable_current_amd64.deb`).
4. Execute the Installation: Because installing core software modifies the system architecture, you must use superuser privileges. You will use the `dpkg` command combined with the `-i` (install) flag. Type the command exactly as follows:

sudo dpkg -i google-chrome-stable_current_amd64.deb

5. Press Enter. Type your administrative password blindly and press Enter again.
6. The Dependency Resolution Protocol (Crucial Step): The `dpkg` utility is a lower-level tool; it does not automatically download missing dependencies. If the terminal throws a massive error stating “dependency problems prevent configuration,” do not panic. Simply execute this secondary command to force the system to download the missing pieces:

sudo apt install -f

Press Enter. The system will download the required libraries and instantly complete the broken installation.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.