- How to Install Linux Apps
- The command line makes it easy to add specific programs to your system
- The Methods of Installation
- Does Distribution Choice Matter?
- What Is a Package Manager?
- What Is a Repository?
- How to Install Programs on Linux From a GUI
- How to Install Linux Software From the Command Line
- Finding and installing Linux applications
- Package management in Fedora
- File placement
- Resolving dependencies
- Updating packages
- Repositories
- Installing from source code
- Other installation methods
- Searching for Linux software alternatives on the Web
- Browsing and installing software on Fedora
- Installing software packages using the command line
How to Install Linux Apps
The command line makes it easy to add specific programs to your system
If you’ve decided to take the leap into the land of Linux, one of the first questions you might find yourself asking is, “How do I install applications?” We’re going to remove the mystery from that task so you have all the tools you need to get your work done.
The Methods of Installation
There are three different ways to install applications on Linux:
- Using a graphical package manager.
- From the command line.
- Compiling from source code.
We’ll take a look at the first two methods, as compiling from source code isn’t always the best route to go. Before we get into the how-to of installing applications, there are some questions to be asked and answered.
Does Distribution Choice Matter?
The answer to this question depends on the method of installation you choose. If you opt to go the GUI package manager route, such as Ubuntu Software, GNOME Software, or the Elementary AppStore, distribution choice isn’t nearly as important. Installing a piece of software with GNOME Software is the same on Debian as it is in Fedora. It’s when you start working with installing applications from the command line that distribution matters because many distributions of Linux use a different package manager—which brings us to our next question.
What Is a Package Manager?
A package manager is a collection of tools that help automate the process of installing, upgrading, configuring, and removing software on a Linux distribution. The different package managers are:
- DPKG: The base package manager for Debian-based distributions.
- Apt: A front-end for the DPKG system, found in Debian-based distributions, such as Ubuntu, Linux Mint, and Elementary OS.
- Apt-get: A more feature-rich front-end for the DPKG system, found in Debian-based distributions.
- RPM: The base package manager found in Red Hat-based distributions, such as Red Hat Enterprise Linux, CentOS, and Fedora.
- Yum: A front-end for the RPM system, found in Red Hat-based distributions.
- Dnf: A more feature-rich front-end for the RPM system.
- ZYpp: Found in SUSE and OpenSUSE.
- Pacman: The package manager for Arch Linux-based distributions.
Where the package manager gets a bit confusing for new users is that distributions such as Ubuntu contain both DPKG and Apt. The difference is the dpkg command is used to install a local .deb file, whereas the apt command is capable of installing software from a repository. The same holds true for Red Hat-based distributions, where the rpm command is used to install local .rpm files, whereas yum and dnf can install software from remote repositories.
Which leads us to our next question.
What Is a Repository?
Nearly every Linux distribution is capable of using remote repositories for the installation of software. A repository is a remote server that contains a collection of software that can be installed. There are default repositories a distribution will be aware of, and there are third-party distributions you can add to your system. Once a third-party repository has been added, any Linux software package contained within that repository can be installed on the system.
Let’s install something.
How to Install Programs on Linux From a GUI
There are different GUI tools, depending on your distribution. Here’s a sample:
- Ubuntu Linux: Ubuntu Software
- Elementary OS: AppStore
- GNOME Software: Any distribution running the GNOME desktop
- Discover: KDE’s GUI tool
Since Ubuntu Linux is one of the most popular and user-friendly Linux distribution, we’ll demonstrate on Ubuntu Linux 18.04.
From the Launcher (sidebar on the left side of the desktop), select the Ubuntu Software icon (orange briefcase with an A in the center).
Once Ubuntu Software is open, press Search in the top right corner.
Search for the application you want to install.
Press Install on the application page.
When prompted, type your user password.
Allow the installation to complete.
Adding Repositories From the GUI
Of course, what we’ve just done only applies to the software found in the default repositories. Should you find a third-party repository you want to add, you might have to open a different piece of software. For example, with Ubuntu Linux, you open the Software & Updates application. If your distribution has the KDE desktop, you can not only install software from within Discover, but add repositories all from within the same tool.
Sticking with our example, open Software & Updates. In the resulting window, do the following:
Select the Other Software tab.
Press Add.
Type the complete apt line for the repository to be added. For example, «deb http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu bionic main»
Press Add Source.
Type your user password.
How to Install Linux Software From the Command Line
Believe it or not, this process is actually easier from the command line.
Now you’ll get to see just how flexible Linux really is. Although a standard user can get away with never touching the command line, it’s always good to have this knowledge on your side.
Let’s do the following:
- Add a repository
- Updating apt
- Install an application
For demonstration purposes, we’ll install the flatpak tool, which is a universal installer system.
The first thing to do is add the third-party repository, so apt is aware of the software. To do this, open a terminal window and issue the command:
sudo add-apt-repository ppa:alexlarsson/flatpak
You will first be prompted for your user password. Once you type that, you’ll be asked to hit Enter to accept the installation of the repository. When that’s completed, you’re ready to move on.
The next step is to update apt. Even though you’ve added the repository, apt isn’t aware of the software available on that remote server. To update apt, issue the command:
sudo apt-get update
Once completed, you’re now ready to install the actual software. To install the software, issue the command:
sudo apt-get install flatpak
You’ll be prompted to OK the installation. Type “y” and hit Enter on your keyboard. The installation will start and finish, resulting in flatpak installed on your system.
You’ll also find a vast amount of software ready to be installed from the default repositories. You can either search the GUI tool for that software, or issue a search command. For example, say you want to know what software is available with the keyword “office”. From the command line enter:
Chances are the output of that command will fly by too quickly. Fortunately, you can scroll through the output to find what you’re looking for.
Once you find the name of the software, install it and you’re ready to go.
Источник
Finding and installing Linux applications
This page has been converted from the Fedora Project Wiki and cleaned up for publishing here on the Fedora Docs Portal, but it has not yet been reviewed for technical accuracy. This means any information on this page may be outdated or inaccurate. Reviews for technical accuracy are greatly appreciated. If you want to help, see the README file in the source repository for instructions.
Many powerful software applications are available on the Linux operating system. You can find alternatives to most of the popular applications used on other systems.
You can use the Fedora package management system to install applications. Many applications are available from the repository provided by the Fedora project. You can enable other repositories to get additional applications.
Package management in Fedora
Like most modern Linux distributions, Fedora uses a package management system. Package management tools automate installation, upgrading, and removing of software applications and components.
Each application or component is defined as a package. When the package is installed, all code, configuration, and other files are deployed on the system.
A single package is not necessarily the same as an application. Some applications can be shipped as several packages. Moreover, shared code (libraries) in Linux is normally shipped as separate packages, while in other systems applications often ship their own versions of required libraries and install them if necessary. |
File placement
The package management tools track which files on your Fedora installation belong to each package; normally, every file that is installed in the /usr tree as well as most configuration files under /etc are installed by one of the packages. When installing a package, the package management system verifies its integrity; if any files are missing or corrupted, the package is not installed.
Resolving dependencies
The package management system also tracks all dependencies between the packages. For example, if an application requires some libraries, the package for this application lists the libraries as dependencies. When you install the application package, the package management tools automatically install the library packages. If a dependency is not available, the tools do not install the package, so you can avoid a sudden malfunction.
When you want to remove a package, package management tools cleanly delete all code files for this package without affecting other packages. By default, configuration files are not removed, so you can install the package again and keep the configuration that you have set up earlier.
Updating packages
Updating any package is entirely automatic with the package management system. The system replaces all the necessary code files and preserves existing configuration.
In fact, for most Linux distributions, including Fedora, all of the system installation except the earliest part is performed by installing various packages. Security updates and upgrades to a next release are performed entirely by package management tools.
Fedora’s package management system uses the RPM package format. The application that manages packages in Fedora (since version 22) is DNF. Graphical package management is provided by the Gnome Software utility. For automatic updates, Fedora uses the PackageKit utility. Command-line and graphical tools provide the same results.
Repositories
To get packages, DNF uses repositories. A repository is an organized collection of packages. Repositories can be kept on any data media; notably, the Fedora installation image contains a repository. However, most up-to-date repositories are normally maintained online.
Each Fedora release has an official fedora repository and an updates repository (which contains critical updates since the release). In these repositories, you can find most common Linux open-source software. You can also install packages from other repositories, not maintained by the Fedora project and known as third-party repositories.
Most of the time, it is best practice to install software on your Fedora Linux system using only the Fedora package management system. In this case, packages are installed in the most reliable way and automatic updates can be provided.
Installing from source code
While many Linux applications can be built and installed from from source code, using such builds can make your system much harder to manage. For example, automatic updates to system packages (especially when updating to the next release) might impact an application that was installed from source. And, of course, no automatic security updates are available for the application.
Other installation methods
Sometimes you might need to install software using other package management systems. Notably:
CPAN for libraries for the Perl language
PyPI for libraries (and sometimes applications) for the Python language
Commercial repositories for games
However, installing applications using the Fedora package management systems is the preferred option.
Searching for Linux software alternatives on the Web
To complete your tasks on a Linux system, you need to find the software applications that fit your needs. If you are switching from another operating system, you might need to find replacements for the software that you used before.
Most applications available on Linux are open-source software. You can use open-source software without acquiring any licenses. Moreover, widespread open-source software is usually available in the official Fedora repository, so you can install it easily.
Access the following websites to review Linux alternatives to popular software packages:
Browsing and installing software on Fedora
You can use a graphical utility to browse the available software packages. When you find the software that you want, you can use the utility to install it on your Fedora system.
To install any packages on your Fedora system, you need to have root privileges.
On your GNOME desktop, select the Activities menu and then click the icon.
Find a software package in one of the following ways:
Click one of the suggested categories, for example, Productivity. Then review the suggested packages. To see more packages, select items in the menu in the left-hand part of the window. For example, for the Productivity category, you can select Calendar, Database, Finance, Word Processor.
Choose one of the Editor’s Picks or other recommended software in the window.
Click the icon, then enter a keyword or the name of the application. Review the suggested packages.
Click a package to read its description.
To install the package, click the Install button. When prompted, provide the root password.
Installing software packages using the command line
You can install packages in Fedora using the DNF utility.
You must execute the command with root privileges. Use one of the following methods:
Prefix the command with sudo and provide your user password. The sudo command must be enabled for your user.
Use the su command and provide the root password to switch to a root prompt in a terminal window.
Log in as root on a virtual console.
You must know the name of the package. Any dependencies will be installed automatically.
Источник