How to install .deb file from command line?

Hi, I have a downloaded .deb file that I am trying to install by command line.
I tried

sudo dpkg -i 

but it opens the software center and offers me the flatpak version of this app, which I don't want.
I tried

sudo apt install gdebi

and the same thing happens.

Open Terminal.

Change directory to where the file is:
cd /home/$USER/Desktop/
... or wherever you've got the .deb file.

... and (assuming you only have the one .deb file in the directory you've changed to above; and so you don't have to type out the actual name of the .deb file, which can often be complex and not easy to type correctly):
sudo dpkg -i *.deb


You should also be able to just double-click the .deb file... it should open Software Center and offer to install that .deb file.


As to bash history, you should be able to just press  ↑  and  ↓  keys in Terminal.

It seems that the way to bypass the software center is to answer "no" when asked if I want to install the deb file.

The bash history works right. But the commands I entered did not actually execute (they opened the software center instead of executing) and that is why they did not appear in bash history, leading me to believe that there is an issue with history

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.