Following are the basic commands you need to know to install packages on Ubuntu. All the commands are run by root user.
Using apt
Install packages
apt-get install packagename
Remove packages
apt-get remove packagenameTo remove all dependencies
apt-get autoremove packagename
Search for packages
apt-cache search <keywords>
Update the apt package database after adding/removing repositories
apt-get updateUpgrade packages
apt-get upgradeUpgrade the entire distribution
apt-get dist-upgradeInstalling .deb packages
.deb is the extension of the Debian software package format and the most often used name for such binary packages. Debian packages are also used in distributions based on Debian, such as Ubuntu and others. Debian packages are standard Unix ar archives that include two gzipped, bzipped or lzmaed tar archives: one that holds the control information and another that contains the data. The canonical program for handling these packages is dpkg, most commonly via apt/aptitude.
Install a downloaded Debian package
dpkg -i packagename.deb
Remove a Debian package
dpkg -r packagename
Reconfigure/Repair an installed Debian package
dpkg-reconfigure packagename
Installing a package from source
Installing development tools
apt-get install linux-headers-$(uname -r) build-essential
Extract the source package
tar xvf sourcefile.tar.gzBuilding and Installing the package
cd /path/to/extracted/sourcefile ./configure make make install
Create a .deb package from source files
Install package tools
apt-get install checkinstall
Rebuild package using “checkinstall”
cd /path/to/extracted/package ./configure make checkinstall
You will get the .deb file in current directory. After checkinstall the package will install automatically else run
dpkg -i packagename.deb
Related content:
One Comments
[...] Package Installation and Updates in Ubuntu [...]