5 Package manager commands every Linux beginner should know

This article is for the Linux beginners. I will show you how to do the most important tasks with your {Ubuntu, Fedora, openSUSE} package managers.

In Debian / Ubuntu / Linux Mint:

1. Keep your system up to date:

Update package list:
$ sudo apt-get update

Update system :
$ sudo apt-get upgrade

2. Search for a package:
By package name and by pattern:
$ apt-cache search package

3. Install a package:
$ sudo apt-get install package

4. Remove / Uninstall package:
$ sudo apt-get remove package

5. Verify if a package is installed:
$ dpkg -l | grep packagename

In Fedora / CentOS:

1. Keep your system up to date:

Update package list:
$ sudo yum check-update

Update system :
$ sudo yum update

2.Search for a package:
By package name:
$ yum list package

By package pattern:
$ yum search pattern

3. Install a package:
$ sudo yum install package

4. Remove / Uninstall package:
$ sudo yum remove package

5. Verify if a package is installed:
$ rpm -qa | grep package

In openSUSE:

1. Keep your system up to date:

Update package list:
$ sudo zypper refresh

Update system :
$ sudo zypper update

2. Search for a package:
By package name:
$ zypper search package

By package pattern:
$ zypper search -t pattern pattern

3. Install a package:
$ sudo zypper install package

4. Remove / Uninstall package:
$ sudo zypper remove package

5. Verify if a package is installed:
$ rpm -qa | grep package

Related reading:

  • Debian package managers: Apt and dpkg
  • Fedora package managers: Yum and rpm
  • openSUSE package managers: Zypper and rpm
Liked it? Take a second to support Geekster on Patreon!
Tagged with: , , , , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!