How to Install .deb Packages on Ubuntu and Debian
There are a couple of ways to install a local .deb
file on Ubuntu and Debian-based Linux distributions. One common method is using the apt install
command.
The only thing is, when you specify the file name, you need to prefix it with ./
to let the system know it’s a file in the current directory.
sudo apt install ./package-name.deb
Make sure to update your package list first by running the apt update
command because .deb
packages may have some dependencies needed to fetch them from the repositories.
Then, go to the folder where the .deb
file is located and install it like this.

At the end, you might see this message: Download is performed unsandboxed as root as file
. You can safely ignore it; it is not an error message. This message appears when the local directory is not owned by the root user.
Installing .deb Packages Using the gdebi Command
Another way to install .deb
packages is using the gdebi
command. If the command is not available, you can get it by installing the gdebi-core
package.
sudo apt update
sudo apt install gdebi-core
Then, you can install any .deb
package using the gdebi
command.
sudo gdebi package-name.deb
Make sure you are in the folder where the .deb
package is located in the terminal.

With these methods, you can easily install .deb
files on your Ubuntu or Debian system using terminal.