Installing Packages (Software) - requires sudo permissions
Linux packages have the following extensions:
.deb for debian based software. Ubuntu is debian based.
.rpm for redhat based software. CentOS is redhat based.
apt
is a debian based program.
Remember that apt
is an upgraded version of apt-get
. It also includes apt-cache
in the upgrade. You can choose to use the generic apt
or to specify apt-get
and apt-cache
.
To search for possible software to install, in Ubuntu, we use the apt-cache
program with the following format:
apt-cache search <name>
apt search <name>
sudo apt-cache search game | less
apt
searches the repository for the package or program and installs it. Using apt-get to install or upgrade will install/upgrade all required packages for the particular program you've chosen.
apt-get update
will update the list of available programs to install. It doesn't actually update any programs. It doesn't hurt to always update before installing just in case.
apt-get update <name optional>
apt update <name optional>
apt-get install <name>
will install a program.
apt install <name>
sudo apt-get install openssh-server
sudo apt-get install emacs
apt-get upgrade
will update the program specified.
apt-get upgrade <name>
apt upgrade <name>
To show all the packages installed using apt
cat /var/cache/apt/archives
To install an individual package or program you've downloaded.
dpkg -i <name>
To list all the installed packages
dpkg -l
yum
is similar to apt
it is a redhat based command
yum install <name>
yum install openssh-server
Repositories are a collaboration of the work of many programmers. It is a combination of the Linux kernel, plus the Ubuntu distribution software, plus extra programs and packages. Repositories store this software in such a way that when we request updates to our current installation we only get the new files that need updating and don't have to re-download all files in our system.
The Ubuntu repository components are:
Main - Officially supported software.
Restricted - Supported software that is not available under a completely free license.
Universe - Community maintained software, i.e. not officially supported software.
Multiverse - Software that is not free.
Our repository url's are stored at /etc/apt/sources.list
Textbook reading is optional. It describes package management and repositories in detail.
[WES-14 Package Management] (http://cit.dixie.edu/it/1100/files/linux_text.pdf)