How to install Linux applications from the command line

Linux isn’t as tough as you suppose. Actually, Linux has turn into one of many best desktop and server working techniques on the planet. how is that doable? For one factor, trendy Linux distributions make it so that you by no means want to the touch the command line interface. That is proper, you are able to do every thing you want in a point-and-click GUI – simply as you do with macOS and Home windows. It is actually that straightforward.

And when you can actually do every thing with well-designed GUI instruments, there might come a time once you want (or simply wish to) make the most of the {hardware}. One such case could be for those who deploy Linux as a server with out a desktop atmosphere. You could wish to have a Linux server on your house LAN to unfold issues out, together with internet servers, file servers, media streaming platforms, and extra. When that is the case, you will have to know set up apps from the command line.

For instance, you wish to set up the Nextcloud cloud-based content material administration and collaboration platform. Or perhaps you wish to construct a complete web site from scratch and serve it through the Apache internet server. You might also desire a full LAMP package deal (Linux Apache MySQL PHP) in your server.

Whatever the motive, you’ll need to know set up these purposes from the CLI (Command Line Interface). I will present you ways. Let’s keep on with the LAMP package deal instance to indicate you ways to do that on Ubuntu, AlmaLinux, Arch Linux, and openSUSE (which ought to cowl most distros).

prepared? Let’s go.

Putting in a LAMP package deal on Ubuntu-based distributions

Our first presentation in regards to the easy-to-use Ubuntu distribution shall be. Ubuntu makes use of the APT (Superior Packaging Device) package deal supervisor and makes putting in a full LAMP package deal very straightforward. The essential APT set up seems like this:


The place PACKAGENAME is the identify of this system you wish to set up. Earlier than operating the set up, you might wish to replace APT first with:

With the APT replace, you’re prepared to put in the LAMP package deal. One helpful trick with Ubuntu and LAMP stack is that you could set up all of them with one easy command, which is:

sudo apt set up lamp server ^ -y

Should you do not wish to go this route, you may set up packages individually. First set up the Apache internet server utilizing:

sudo apt set up apache2 -y

Subsequent, set up the MySQL database server utilizing:

sudo handy set up mysql-y . server

You’ll then set up the newest model of PHP utilizing:

sudo apt set up php8.1-fpm php8.1 libapache2-mod-php8.1 php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8. 1-imagick php8.1-cli php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-intl php8.1-bcmath unzip -y

After all, you may select to do all of this utilizing the single-line command described above.

Putting in a LAMP package deal in AlmaLinux

AlmaLinx is a distribution based mostly on Purple Hat Enterprise Linux, and set up requires you to put in every package deal individually.

First, set up the online server with:

sudo dnf set up httpd -y

Subsequent, set up the MySQL database server utilizing:

sudo dnf set up mysql-server mysql -y

Lastly, you put in PHP with:

Putting in a LAMP package deal on Arch Linux

Arch Linux is nearly as straightforward to make use of as Ubuntu or AlmaLinux. Arch Linux makes use of the pacman package deal supervisor and should first be up to date with:

As soon as up to date, set up Apache utilizing:

Subsequent, set up the MySQL database server utilizing:

Lastly, set up PHP with:

sudo pacman -S php-apache

The choices used above are:

Putting in a LAMP server on openSUSE

Lastly, we’ll set up the LAMP server on openSUSE, which makes use of the zypper package deal supervisor. zypper replace with:

Set up Apache on openSUSE with:

sudo zypper set up apache2

Set up MariaDB utilizing:

sudo zypper set up mariadb mariadb shopper mariadb instruments

Set up PHP7 with:

sudo zypper set up php7 php7-mysql apache2-mod_php7


Apart from Arch Linux, software program set up is mostly dealt with as follows:


the place PACKAGEMANAGER is the package deal supervisor utilized by the distribution and SOFTWARE is the identify of this system to be put in.

The identical applies to eradicating packages, as in:

sudo PACKAGEMANAGER Take away this system

Once more, the place PACKAGEMANAGER is the package deal supervisor that the distribution is utilizing and SOFTWARE is the identify of this system to put in.

To clarify it higher, you may set up Firefox internet browser on every platform like:

  • Ubuntu – sudo apt set up Firefox -y

  • Alma Linux – sudo dnf Set up Firefox -y

  • openSUSE – sudo zypper firefox -y. Sudo Zipper Firefox

After all, with Arch Linux, this command could be:

sudo pacman -S Firefox -y

And these are actually the fundamentals of putting in software program from the Linux command line. It’s very easy that anybody who can write can set up the software program from the Linux command line.