The Easiest Ways To Install Programs On Linux
Due to Linux’s Open-Source Nature, Different Methods for Installing Programs exist. In This Article, We Will Discuss The Easiest Methods.
The Linux operating system refers to a large family of open-source operating systems based on the Linux kernel. These systems have different applications, from server and database management and general enterprise infrastructure to available desktop systems.
Entering the world of open source has no end; no matter what we write and read about it, it does not end. Therefore, in this article, we will only discuss teaching how to install the program in Linux.
You must first select the Linux operating system to install the program in Linux. Therefore, we recommend that if you plan to migrate from Windows or Mac OS to a Linux desktop, answer questions based on your needs and choose the best Linux distribution according to your answers.
Remember that along this path, you may have many questions that will discourage you from doing this, But rest assured that almost anything is possible in the open-source world.
One of the critical questions of users is what software is available for Linux and how to install the program in Linux.
Methods of installing programs in Linux
Program installation in Linux can be divided into two categories: installation through the graphical user interface and structure with the command line command. Each of these two methods can be classified into smaller processes to cover the types of programs available in this operating system.
After choosing and installing the best Linux operating system and before learning how to install programs on it, we must learn essential concepts and how programs work.
package
In Linux, a package is the basic unit of software. It is a compact set of files that contain all the data related to the software. This package also includes Meta-Data and instructions for implementing a specific function or software on the user’s system.
These packages are made available to users by developers known as Package Maintainers. The Package Maintainer receives the software’s source code from the original company or developer, compiles it, and creates the package metadata.
In the meantime, the source code may be changed to improve the program’s compatibility and integration with other Linux distributions. Now, the package is available to install the program on Linux.
Package manager
Package Managers (Package Managers), or package management, is one term that confuses most new Linux users. Package managers are a group of subsystems and tools in Linux that allow the user to manage packages or software on the operating system. In addition, it keeps a log of all installed programs, downloads packages, ensures that software is installed in the correct location, is used to upgrade packages, resolves dependencies, and eliminates the need for users to install from source code. Additionally, it notifies the user of a firmware or software update release.
The package manager is a set of tools for installing, updating, configuring, and removing programs in Linux.
Another thing to mention is that there are different package managers, and each Linux distribution has its package management tool. For example, Debian distribution, Ubuntu and its derivatives from apt package management, Red Hat Enterprise Linux distribution, CentOS and Fedora from Yum, SUSE and openSUSE distribution fromZypperr, and Arch Linux distribution use Pacman.
Therefore, each package manager works with one data type or, more precisely, one package type. For example, apt works with deb files, and Yam and Zipper work with rpm. They are working. Therefore, a capable package manager can install rpm files. It is not, and Yam and Ripper cannot install deb files. They are not.
Package management systems are divided into two basic categories: 1—Low-Level Package Tools, which control installing and removing package files, and 2—High-Level Package Tools, which are responsible for metadata search and dependency removal.
Another difference between package managers is the possibility of installing from local files or searching and downloading through remote repositories online. For example, Ubuntu and its derivatives use the pkg package management command to install deb files. Unlike apt, they use local, and this command cannot search for remote repositories or receive packages from them.
Also, Red Hat-based distributions use RPM to install local RPM files. To download and install the program in Linux through other repositories, you must use yum and dnf.
Based on the dual classification of package managers, package management systems dpkg and rpm are considered low-level package tools, while apt, yum, and zypper are regarded as high-level package tools.
It’ll become much easier with time. In addition, package managers were also designed with a graphical user interface (GUI) that serves the user like an application. These GUIs are similar to Apple’s App Store or Google Play Store, and there are countless of them available. These concepts may seem a bit confusing, especially at the beginning of migrating and installing software. Still, they will become much easier with time.
For example, we can mention Ubuntu Software Center, GNOME Software Center, and Elementary App Center. These app stores allow you to search for a software title and install it on your Linux distribution with one click.
Another important application of the package management system is to remove dependencies. Most programs are not independent and require components of other programs to perform functions.
Everyday activities such as input/output are performed by routines (in programming, a practice is a sequence of instructions to perform a specific subtask of a computer program) that are shared between different programs.
These routines are stored in shared libraries that provide essential services to multiple applications. Today’s package management systems have dependency resolution methods to ensure that all dependencies are installed when a program is installed on Linux via a package.
We remind you that the discussion about the types of package managers and their mechanisms can be advanced much more profound, but this is enough to teach you how to install the program in Linux.
Tanks
Another part that the user will deal with when installing the program in Linux is Repositories. The packages described above are available to users through these central repositories, which contain thousands of boxes created and optimized for a specific distribution. Each distribution has its official or standard repositories that the user can configure.
In addition to the official and standard repositories, the user can add third-party repositories through the GUI and the command line.
In other words, the storage can be considered a public server, which must be configured on the distribution to install the program in Linux and then call and install the desired software using the package manager. can add
Terminal
A complete explanation of a Linux terminal requires a separate article. Still, an airport in Linux is a text-based user interface through which the user enters coded Linux commands and controls the operating system. Linux commands are also particular keywords that represent minimal applications. These applications are installed on the computer during the active system installation and will be accessible only through the terminal.
In the following, we will first discuss the methods of installing the program in Linux through the graphical user interface, which may be easier for many users to believe. Still, in some cases, it has complications, and then we will check the method of installing the program in Linux with a command in the terminal.
Installing software in Ubuntu Linux
It is straightforward to install an application in Linux Ubuntu using Software Center. This method is similar to installing an application on the Android platform, where the user finds the desired application in the Play Store, downloads it, and installs it from there. This easy method of installing software on Linux falls under the installation category with the help of a graphical user interface, which is better for general users.
As mentioned, the Linux operating system has different distributions that run the software installation process slightly differently. For example, if a user wants to install the software in the Ubuntu distribution using a graphical user interface, he can use the Ubuntu Software Center.
It covers the high-level and low-level package management system and shows the software installed on the Ubuntu distribution with a graphical user interface. It will also show the titles of available software installed on the distribution.
Almost all other Linux distributions offer a similar service to the Ubuntu Software Center and work the same way. In addition, Ubuntu Software Center suggests related or comparable software based on the programs the user downloads and installs. Of course, Ubuntu Software Center was discontinued in 2016, and many users today use the GNOME Software Tool.
Installing the software on Linux is done with a few clicks through the Ubuntu Software Center. The installed program will be available in the Ubuntu Launcher section, which can be seen as a circular icon with a brown color on the upper left side of the screen. Of course, launching installed programs through the Software Center is also possible.
Installing the program in Linux with Synaptic
Synaptic package management software is a powerful GUI-based package management system that can install software on Linux. To run Synaptic, click the Operating System menu at the top left of the desktop menu, then click Administration and open Synaptic Package Manager. After entering the password, the package management system will be executed.
Synaptic offers several options, including an extensive list of software categories on the left side. Click the Search button on the right side of the toolbar to open a field for typing the program name you’re looking for.
For example, suppose we want to install “Chess. ” First, type its name in the search box and press the Search button. The package mentioned will be displayed along with a description and information on the available version.
After checking that information, ensure it is the program you want. Then right-click on it and select Mark for Installation from the menu, which appears to be the desired installation software.
Notably, some software that depends on other e-software is included in the program category. As the essential concepts explain, such programs must install additional packages.
Therefore, Synaptic warns the user that by installing this program, other necessary software that appears in the left menu will also be downloaded to remove dependencies. In addition, after clicking on Mark, the user will be directed to the Synaptic main menu to add other programs to the installation list if needed.
Finally, the Synaptic package manager downloads the requested software from the Internet; if the programs selected for installation are available on the operating system installation disk, the user is prompted to insert the disk to complete the installation process on Linux.
Installed programs are available to the user in the Applications menu. If the user wants to discover where to install the program in Linux, he should again ask Synaptic for help.
To do this, right-click on the program in the Synaptic menu, Display Properties, and click on Installed Files. Then, select Mark for Removal from the same right-click menu to remove the software.
There are limited cases where the Synaptic package management system is not installed on a Linux distribution. To install the program in Linux by Synaptic, you must first install this GUI-based manager package. Still, its installation is done through the command line, so enter the following command line in the terminal:
Sudo apt install synaptic
After Synaptic is installed, it can now be run from the GUI. Then, select the desired software for installation by clicking on the Installation option and then click Apply.
Install the downloaded program on Linux.
Installing a downloaded program in Linux using a graphical user interface is similar to installing software in Windows, where the executable file is launched, and a wizard guides the installation process.
Some programs are not provided by default in Linux distributions. This topic includes programs independent of the operating system, such as Google Chrome, Skype, Steam, Opera, etc.
Linux distributions have not received the right to supply such software from the original company; therefore, the user should download it from its official source if needed.
Different distributions support different packages with other extensions. For example, suppose a user wants to install Skype on the Ubuntu distribution. In that case, he must visit the Skype website and download the special package for Ubuntu distribution with the .deb extension. Ubuntu, Linux Mint, Debian, and similar distributions use Deb packages with the .deb extension.
Be careful: After clicking on the download option, a message may appear asking whether you intend to open the package with Software Installer or save it.
It should be noted that not all distributions support opening the box for installation without a package manager. Another method should be used to install the program on Linux, which will be explained below.
Suppose the user does not choose to install directly before downloading. In that case, the Skype .deb package will be downloaded and saved. By double-clicking on it and entering the password, Ubuntu Software Center will open and can complete the installation process directly from within.
In other cases, the user may be looking to install software on Linux that requires third-party or unofficial repositories. Anyone can create software repositories and make them available to others. Thus, if the user needs third-party repositories, he must configure them on his Linux distribution.
Of course, the packages available on these repositories are often invalidated, so use them at your own risk and proceed with full knowledge.
However, adding Personal Package Archives, or PPAs, to your Ubuntu distribution is straightforward. The user can add the required PPA in the package manager so that its packages appear in the Ubuntu Software Center.
There are two ways to add PPA: GUI and command line in the terminal. In this section, we will discuss the method of adding through the graphical user interface and the process through the terminal’s command line.
In the Ubuntu environment, click Unity Dash and search for and open Software & Updates, as shown in the image.
On the opened page of Software & Updates, click on the Other Software tab, click the Add button, and now enter the address of the new PPA. In this image, for example, we will add the PPA for the screenshot tool Shutter.
To find the latest PPA version of Shutter software, refer to software sharing platforms for Ubuntu packages, such as launchpad.net, and search for the Shutter score example.
The PPA address of the Shutter software will be as follows:
deb https://ppa.launchpadcontent.net/shutter/ppa/ubuntu hirsute main
Now click on Add to bring up the box to enter a password for authentication. Enter the password and confirm the changes. Although the user interface may seem easy, typing the command line into the terminal is much easier than using unofficial repositories when adding repositories and installing programs on Linux.
To add the PPA to the terminal, we enter the following command just as quickly:
Sudo add-apt-repository PPA: shutter/PPA
The above command, after completing a file at /etc/apt/sources.list.d., will create
Installing the program with the knowledge of Linux
It is not unreasonable to say that using the terminal instead of the graphical user interface is part of the fun of working with the Linux operating system.
One of the most important uses of the airport as a text and code-based interface is to install software on Linux. Although this may seem difficult for general users at first, with a bit of practice and effort, the speed of the user’s action will increase.
Since then, they have been learning to install the program with commands in unique Linux server operating systems, which is considered vital. Users at that level must be familiar with the terminal and its conventional controls to manage the server.
There are different modes for installing the program with the command in Linux in the terminal, which are defined based on the distribution, compatible packages, and the type of access to the boxes. The result may be the same, but the mechanism of each one is different and depends on many factors.
The most important thing to note is that to install the program with the command in Linux, the user must have administrator access, which is called root in the Linux platform. For this purpose, the command line entered in the terminal must be started with sudo.
Install the program in Debian Linux with the terminal
Debian-based distributions include Ubuntu, Linux Mint, etc., among the most popular distributions among Linux users. In general, installing Debian packages uses the airport with two text-based package management systems, dpkg and apt.
Install the program in Linux using the pkg command.
The pkg command is a low-level tool used to install local .deb packages. Suppose you plan to install a program on Linux without calling the repositories or offline and know the package file is stored in memory or downloaded separately from a website. In that case, you can use the pkg command to install it.
Open a terminal and enter the command to enter the downloaded files folder:
cd ~/Downloads
Then install the program with the following command:
Sudo dpkg -I package_name.deb
After the above command, it is necessary to solve the problem of software dependencies because, unlike when installing the package with apt, the dpkg tool does not automatically solve the dependencies. On the other hand, to solve this problem, we need access to non-local repositories that are unavailable through the pkg tool.
Therefore, to fix possible dependency problems, the high-level tool and the following command line must be used.
sudo apt install -f
Install the program in Linux with the apt command.
Advance PackAn aging Tool package management system or APT is a high-level VL for installing programs with commands in the Debian Linux distribution. The apt package manager installs programs from any local or non-local repositories, and mastering it will give you an engaging experience with the Linux operating system.
In other words, using apt, you can search for packages in an online repository and then download and install the program on Linux. The APT command is the fastest and easiest way to install an application in Ubuntu.
Below are the steps to install the software using apt. First, open the terminal, enter the following command, and press the enter key.
sudo apt-get install <app name>
The root password is requested in the following line and must be entered. Press enter again to start downloading and installing the program from the repositories. The program’s latest version will be downloaded and installed by executing this command to install the program in Linux. The apt package management system can also notify users of other necessary software (dependencies) to run a program.
To know about the update of the repositories used by apt and to learn about the newly added programs, the user should update the apt data directory with the help of the following command:
Sudo apt-get update
To update old packages in Linux to the latest version, the following command is used:
Sudo apt-get upgrade
You can also use the following command to remove the installed program:
apt-get remove <app name>
Installing the program in Kali Linux
Kali Linux is a Debian-based distribution used for network security analysis, hacking, and penetration testing. According to the definition of this operating system, it can be assumed that installing programs in Kali Linux is precisely similar to installing software in Debian distributions.
Therefore, to install the program in Kali Linux, you can use the graphical user interface and package management systems such as Ubuntu Software Center, Synaptic, and GNOME Software Center. You must use the APT tool and command through the text user interface in the terminal.
Installing software in Linux with the YUM command
The files with the .rpm extension, Red Hat’s masterpieces, were initially installed with the rpm command in the terminal. Still, over time, a more straightforward package management system called YUM called YUM was designed to install rpm files. The YUM system is very similar to the APT system in Debian, except that YUM is specific to RPM-based Linux distributions such as Fedora. The most crucial advantage of YUM is that it solves the problems of user program dependencies.
To install the program in Linux with YUM, you can enter the following command in the terminal. For example, installing the Firefox browser on Linux:
Sudo yum install Firefox
As you can see in the command line, there is no need to specify the program version. The YUM system will automatically search the Internet and find and install the latest available version of the program, here Firefox. Other software required to run Firefox will also be installed with the same command line. The following command is also used to remove the program in Linux through YUM.
yum remove <app name>
The YUM system provides access to the graphical user interface and the command line, which benefits users who do not want to install software in Linux using the command line. Of course, to use it, you need to install the YUM Extender package management system using the following command.
Sudo yum install yumex
The user can now access YUM Extender in the menu under System Tools and install the program through it, although learning a few command lines will make things much easier and faster.
Another method for installing programs in rpm-based Linux systems was initially introduced as a replacement for the YUM package management system. DNF package management software was initially used to install, update, and remove packages on Fedora, RHEL, and CentOS operating systems.
DNF is the default package management system on Fedora 22, CentOS8, and RHEL8 and is said to be gradually replacing YUM on all rpm-based Linux distributions. This package management system is potent and offers more exciting features than what was available. Its features make maintaining packages more manageable and can automatically resolve dependencies.
To install the program on Linux using dnf in the command line, enter the following command to call the program from online repositories for installation:
sudo dnf install<app name>
If you have already downloaded the file, you must install it with the following code:
sudo dnf install ~/Downloads/tito-0.6.2-1.fc22.noarch.rpm
Installing software in Linux with source code compilation
Sometimes, a user may want to install a program whose ready package is unavailable or, for any reason, only have access to the software’s source code. Installing the program in Linux through the source code is the last way to go, especially since it is difficult for ordinary users to implement. It is better to master the Linux operating system or programming to get a favorable result. Of course, it doesn’t cost anything to try, and it’s not impossible.
However, explaining how to install the program on Linux by compiling the source code does not fit into this opportunity because it is not necessary for the general user, in addition to the many details and various details in each distribution.
Installing Windows programs on Linux
It is impossible to run Windows programs natively in Linux, but there are ways to do so. One of the easiest ways is to use Wine, which is considered a compatibility layer and acts as an interface that enables the execution of binaries of a foreign system in another system.
Another way to run Windows programs on Linux is to use a virtual machine, which allows you to install one operating system completely inside another operating system. Now, you can install Linux on your MacBook using a virtual machine.
Of course, there are limitations to using Wine. For example, apart from the fact that the provided programs are not updated, the execution stability is not very reliable. Therefore, using a virtual machine is better, provided adequate hardware resources are available to the user.
Where to install programs in Linux
By default, Windows programs’ installation locations are in the Program Files folder in the partition related to Windows system files. The user can also change this location if necessary. Still, this issue is considered a security vulnerability in the Linux environment. For increased security, it is generally best to store executable files separately from mutable data.
This helps prevent unauthorized changes to installed binaries from being quickly issued. Additionally, libraries that may receive updates should be kept separate from the main executables. Of course, with the advent of Vista and the introduction of the User Account Control feature, this point was also considered in Windows.
However, Unix and Linux were known as multi-user systems much earlier; Therefore, they used the procedure to separate executable file directories from other directories earlier to prevent changes to installed binaries by users other than root.
Where to install programs in Linux depends on the user’s distribution and package management system.
In any case, the address of the installation location of the programs in Linux can be as follows:
- Installed binaries:
/usr/bin
- Whole system configuration:
/etc
- User Configurations:
~/.program
- Libraries:
/usr/lib
But if you want to know the exact address where a specific program is installed in Linux, you can use the terminal and the which and where commands.
For example, you can find the exact location of Firefox by running the following command in the terminal:
which firefox
/usr/bin/firefox
The whereis command, however, provides more information, and by running it, you can find the location of a program’s binary, source code, and instruction manual.
whereas Firefox
firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/lib64/firefox /usr/bin/X11/firefox /usr/share/man/man1/firefox.1.gz
These commands can be more detailed, and more accurate results can be obtained.
Conclusion
The methods of installing programs in Linux can be considered as diverse as the types of existing Linux distributions. Still, contrary to popular belief, it can be claimed that installing programs in Linux with the terminal and command line is easier than it seems.
However, installing software on Linux through the terminal to compile the source code is a massive task that not everyone will do.
Finally, we suggest that if you plan to migrate to Linux, first install a virtual machine on your current operating system and try one of the Linux distributions so that you can make a decision more efficiently. If you plan to use Linux for server use, there is no other way. You will not master and know the terminal and all kinds of commands.