Install Linux Software Via Command line








Are you trying to install Linux Software via command line?

This guide is for you. 


The command line also known as the terminal, shell, console, command prompt, and command-line interface (CLI) is intended to interpret commands.

Installing Linux software from the command line can save you time, money, and make things easy.

Once we have learned how the command line works, we will move on to installing, removing, and updating our software packages by means command line with yum. 

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Linux based Software Installation tasks.


How to Install Linux Software Via Command line ?

Before seeing how to Install Linux software via the Command line, we can take a glimpse of what the command line is.


What Is The Command line?

The command line is a text-based interface that we can use to input instructions on a computer. The bash shell program usually provides the Linux command line. 

Red Hat Linux utilizes the GNU Bourne-Again Shell, also known as "bash".

When the bash shell passes info between the user and the computer, it displays a symbol while awaiting a command from the user. 

This interface is called the shell prompt.

By default, a prompt usually ends with a dollar sign $ character.

The shell replaces the dollar sign $ with pound sign # when it is running as the root user.

This symbol helps to avoid accidents and mistakes on the accounts with elevated privileges of a superuser.


How To Access The Command line In A Desktop Environment?

To get a shell prompt in GNOME, start a graphical terminal application.

i. Firstly we need to select Applications.

ii. After that, we can go to the Utilities and take the Terminal.

iii. On the desktop, right-click or press the Menu key, and select “Open in Terminal” from the menu.

iv. After that, from the Activities Overview, select Terminal from the dash.


More about RPM And Software Packages

Red Hat developed the RPM Package Manager software, which provides a standard way to package software for distribution.

Managing software in the form of RPM packages is much simpler than working with software that is extracted into a file system from an archive.

Moreover, a local RPM database stores the information about the packages we install.

Each RPM software package is an archive that has three components:

1. The files installed by the packages

2. Information (metadata) about the package – name, version, release, architecture

3. A script that usually runs when we install, update or remove the package.


The YUM Package Manager

The YUM command searches multiple repositories for software packages and any dependencies so that it can install them all together to reduce or eliminate and dependency issues.

Further, the main configuration file for yum is at /etc/yum.conf with additional repository configuration files in the etc/yum.repos.d directory. 

And it allows listing repositories, packages, and package groups.


How to manage Software Updates With YUM ?

Yum is a powerful command-line tool that we can use to flexibly manage software packages.


Finding Software with YUM

Firstly, we will see some of the common yum commands:

yum help – display usage information
yum list – display installed and available packages.
yum search KEYWORD – list packages by keywords found in the name and summary fields.
yum info PACKAGENAME – gives detailed information about a package.
yum provides PATHNAME – displays packages that match the pathname specified.

Before we begin to install a package, we need to ensure that our system is up-to-date by using the following command:

$ yum update

After that, we can install the package we wish to by using the following command:

$ yum install PACKAGENAME

The above command obtains and installs a software package, including all dependencies.

Yum now installs our package.


We can update our package with the following command:

$ yum update PACKAGENAME

The above command obtains and installs the newest version of the software package, including all dependencies. 

If no PACKAGENAME specified, it will install all relevant updates.


For removing a package we can use the following command:

$ yum remove PACKAGENAME


How to enable YUM Software Repositories ?

Registering a system to the subscription management service automatically configures access to the software repositories based on the type of subscriptions.

To view all the available repositories, we can use the following command:

$ yum repolist all

For enabling a repository we can use yum-config-manager.


How to enable Third-Party Software Repositories ?

To enable third-party support, we must put the file in the /etc/yum.repos.d/ directory. 

If the URL for a yum repository is known, a configuration file can be created via yum-config-manager.


Using YUM To Install Local Package Files

We can use the following command:

$ yum install PACKAGEFILE.rpm

This can be used to install package files directly. 

It automatically downloads any dependencies the package has from any configured yum repositories.

Here we have downloaded an rpm file.

Next, we can use the following command to begin installing the file from our machine:

$ yum localinstall


[Need assistance with Software Installation tasks on your Linux Server? We are happy to help you. ]



Conclusion

This article will guide you on methods to install #Linux #Software via command line. #Debian, Ubuntu, Mint, and other Debian-based distributions all use . deb files and the dpkg package management system. There are two ways to install apps via this system. You can use the apt application to install from a repository, or you can use the dpkg app to install apps from .


To compile a program from a source in Linux:

i. Open a console.

ii. Use the #command cd to navigate to the correct folder. If there is a README file with installation instructions, use that instead.

iii. Extract the files with one of the commands.

iv. ./configure.

v. make.

vi. sudo make install (or with checkinstall ).


To Check os version in Linux:

1. Open the #terminal application (bash shell)

2. For remote server login using the ssh: ssh user@server-name.

3. Type any one of the following command to find os name and version in Linux: cat /etc/os-release. lsb_release -a. hostnamectl.

4. Type the following command to find Linux kernel version: uname -r.


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com