Wednesday, June 15, 2016

How to install debian package (.deb) on Ubuntu


When you enter the world of ubuntu, often you will find program with an extension of .deb, these are debian package, the question is how to deal with these debian package? how to install or run these debian package?

Well, if you are on graphical mode or X window, you can just double click the .deb file, it will automatically install the program through ubuntu software center, which is fine, but there is more elegant way to do this.

You can also install debian package from the command line, it is more elegant than double click the .deb package, after all we are a linux user, so using command line should be our priority.

To install or run debian package from command line (.deb), we can use tool called dpkg which is available on ubuntu, here's the syntax:

sudo dpkg -i [name-of-the-debian-package]

Example:
sudo dpkg -i google-chrome-stable_current_i386.deb
sudo dpkg -i opera-stable_33.0.1990.115_amd64.deb
sudo dpkg -i coolprogram.deb
sudo dpkg -i whatever.deb

Noticed that it needs to be run under root permission, that's why you need run it with sudo command, otherwise you will get an error.


No comments:

Post a Comment