How do I install .deb file?
To install a .deb file, simply double click on it, and then select Install Package
or
To install package called package.deb type the following command:Go to directory where package.deb is kept. For example if it is in /tmp directory:
$ cd /tmp
Type the following command:
$ sudo dpkg -i package.deb
Remember, you will need to become SuperUser to install software.
Debian, Ubuntu: APT
There is a broad array of tools for working with DEB packages, but theone you will commonly use isapt-get
, arguably the easiest ofLinux package management tools. apt-get
is so easy because it notonly keeps track of what packages are installed, but also what other packagesare available. It will even download them from the Internet for you (ifproperly configured).[root]# apt-get install packagenameTo remove software is just as easy.
[root]# apt-get remove packagenameAlthough the repositories that contain installable packages might live on the Internet or on a disc somewhere, APT keeps a local database on your hard drive with a list of all available packages and where to find them. This database needs to be explicitly updated. To update the APT database:
[root]# apt-get updateA common idiom is to update your package database, and then upgrade all the packages that have patches or security updates to install. The following command will do this all at once.
[root]# apt-get update; apt-get upgradeFor a more indepth
apt-get
tutorial and other resources, seeManaging Software with APT and dpkg.Fedora, Red Hat: yum
yum
does for RPM packages roughly what apt-get
does for Debian packages. Like apt-get
, yum
can download and install packages from a configured repository.[root]# yum install packagenameTo remove software is just as easy.
[root]# yum remove packagename
yum
does not keep a local copy of your package database by default, so normally there is no need to update it. To install all available security patches and bug fixes, use this command:[root]# yum updateYou can also explicitly update a single package with:
[root]# yum update packagenameFor a more indepth
yum
tutorial and other resources, seeManaging Software with yum and rpm.Mandriva: urpm
Mandriva Linux (formerly Mandrake and Connectiva) has a toolset similar to APT called urpmi. To install software:[root]# urpmi packagenameTo remove software:
[root]# urpme packagenameTo update the local package database:
[root]# urpmi.update -aTo install security updates and bug fixes:
[root]# urpmi --auto-selectFor a more indepth
yum
tutorial and other resources, seeManaging Software with urpm.Tar Balls
No, this is not a naughty term! A tar ball is a (usually compressed) archive of files, similar to a Zip file on Windows or a Sit on the Mac. Tar balls come in files that end in .tar, .tar.gz, .tgz, or something along these lines. To unpack a tar ball, use this command.[user]$ tar -xzvf filename.tar.gzThe parameters are x to extract files, z to filter through gzip for decompression (leave this off if the file does not have a gz extension), v for verbose mode so you can tell what's going on, f indicating there will be a filename to follow. You may want to create an alias called "untar" that feeds in these options if you have a hard time remembering command line options as I do.
This command will not install the software, it will only extract the archived files. It is your job then to find the README file or INSTALL file and read its instructions for installation. If the archive contains binaries there will usually be a setup script (often called install.sh) that you must execute as SuperUser.
Very often, software delivered in tar balls is not in executable form, but in source code, which must first be compiled before it can be installed. For more details on this, see Installing Software from Source Code.
Other Systems
Some other Linux distributions have their own way of managing packages, notably SUSE. SUSE uses RPM as its native package format, but has its own high level tool to manage system software installation.SUSE Linux uses a tool called
yast
(which allegedly is an acronym for Yet Another Setup Tool) to perform all kinds of system administration tasks, including installing software.