Science and technology

How to put in software program from the Linux command line

If you utilize Linux for any period of time, you will quickly study there are numerous other ways to do the identical factor. This contains putting in functions on a Linux machine through the command line. I’ve been a Linux consumer for roughly 25 years, and time and time once more I discover myself going again to the command line to put in my apps.

The most typical methodology of putting in apps from the command line is thru software program repositories (a spot the place software program is saved) utilizing what’s referred to as a package deal supervisor. All Linux apps are distributed as packages, that are nothing greater than recordsdata related to a package deal administration system. Every Linux distribution comes with a package deal administration system, however they aren’t all the identical.

What is a package deal administration system?

A package deal administration system is comprised of units of instruments and file codecs which might be used collectively to put in, replace, and uninstall Linux apps. The two most typical package deal administration programs are from Red Hat and Debian. Red Hat, CentOS, and Fedora all use the rpm system (.rpm recordsdata), whereas Debian, Ubuntu, Mint, and Ubuntu use dpkg (.deb recordsdata). Gentoo Linux makes use of a system referred to as Portage, and Arch Linux makes use of nothing however tarballs (.tar recordsdata). The main distinction between these programs is how they set up and preserve apps.

You is likely to be questioning what’s inside an .rpm, .deb, or .tar file. You is likely to be shocked to study that each one are nothing greater than plain previous archive recordsdata (like .zip) that include an software’s code, directions on how you can set up it, dependencies (what different apps it might rely on), and the place its configuration recordsdata ought to be positioned. The software program that reads and executes all of these directions is known as a package deal supervisor.

Debian, Ubuntu, Mint, and others

Debian, Ubuntu, Mint, and different Debian-based distributions all use .deb recordsdata and the dpkg package deal administration system. There are two methods to put in apps through this method. You can use the apt software to put in from a repository, or you should use the dpkg app to put in apps from .deb recordsdata. Let’s check out how you can do each.

Installing apps utilizing apt is as simple as:

$ sudo apt set up app_name

Uninstalling an app through apt can also be tremendous simple:

$ sudo apt take away app_name

To improve your put in apps, you will first must replace the app repository:

$ sudo apt replace

Once completed, you may replace any apps that want updating with the next:

$ sudo apt improve

What if you wish to replace solely a single app? No downside.

$ sudo apt replace app_name

Finally, as an example the app you wish to set up isn’t obtainable within the Debian repository, however it’s obtainable as a .deb obtain.

$ sudo dpkg -i app_name.deb

Red Hat, CentOS, and Fedora

Red Hat, by default, makes use of a number of package deal administration programs. These programs, whereas utilizing their very own terminology, are nonetheless similar to one another and to the one utilized in Debian. For instance, we are able to use both the yum or dnf supervisor to put in apps.

$ sudo yum set up app_name
$ sudo dnf set up app_name

Apps within the .rpm format may also be put in with the rpm command.

$ sudo rpm -i app_name.rpm

Removing undesirable functions is simply as simple.

$ sudo yum take away app_name
$ sudo dnf take away app_name

Updating apps is equally simple.

$ yum replace
$ sudo dnf improve --refresh

As you may see, putting in, uninstalling, and updating Linux apps from the command line is not arduous in any respect. In truth, when you get used to it, you will discover it is sooner than utilizing desktop GUI-based administration instruments!

For extra info on putting in apps from the command line, please go to the Debian Apt wiki, the Yum cheat sheet, and the DNF wiki.

Most Popular

To Top