-
Notifications
You must be signed in to change notification settings - Fork 14
Packaging Managers
One of the benefits that Unix systems have over their Windows brethren include a built-in packaging system, a centralized location for listing currently installed packages, updating them, removing them, and installing new packages. Various distros will have their own flavor of packaging managers and commands, but in general packages are the same across distros. For Ubuntu and Debian, the packaging manager used is APT (Advanced Packaging Tool) or apt-get. For CentOS and Redhat, the packaging manager used is YUM (Yellowdog Updater, Modified) or yum. Similar syntax can be used for both. In general, one can use the following commands to cover the vast majority of use cases.
As most packages will be installed at the system level, they will require privilege elevation to be run (see running commands as root
-
apt-get install package- searches and attempts to install the given package name. Packages can be chained after another, e.g.apt-get install package1 package2will install package1 and package2. -
apt-get update- updates the internal source listing, i.e. package listings. -
apt-get upgrade- takes the currently installed packages and checks for any newer versions and installs them. -
apt-get remove package- removes the given package name. -
apt-get autoremove- cleans up dependencies that are no longer being used.
For example, to install the git-client on
- Ubuntu:
sudo apt-get install git - CentOS:
sudo yum install git