Vous êtes sur la page 1sur 12

7 Ways to Install Apps and Games in Linux

Written by Ivana Isadora Devcic


February 18, 2016

(http://www.makeuseof.com/tag/author/ivana/)

You did it! You installed Linux, tweaked every little detail. And now what?
Although Linux distributions come with plenty of pre-installed software, sooner or later youll want to install something new
(http://www.makeuseof.com/tag/11-must-apps-ubuntu-right-fresh-install/). But how do I install apps on Linux?, you might wonder. That is
the question were tackling today.
The most common method of installing apps on Linux is from the repositories using a package manager. The principle is more or less the
same everywhere, the main difference being the package management system of a particular distribution. Sound a bit Greek to you? Heres
an explanation.

What Is a Package Management System?


Linux software is usually distributed in the form of packages. In simplified terms, a package management system refers to the tools and file
formats required to manage those packages. Two most widespread package management systems are dpkg (uses .deb files) and RPM (its
packages are .rpm files). The difference between package management systems is generally in their approach to the installation process (for
example, RPM packages can depend on files, rather than other packages).

Sign up for more tips and awesome articles

Email

Let's go

You may already know that Debian, Ubuntu, and their derivatives use dpkg, while Red Hat Enterprise Linux, CentOS, Fedora, Mageia, and
openSUSE use RPM. Gentoos system is called Portage, while Sabayon can use both Portage and its own system called Entropy. Slackware
and Arch Linux use tarballs (.tar files) that contain special metadata, while PC Linux OS sports a mix
(http://www.makeuseof.com/tag/pclinuxos-a-linux-distribution-which-mixes-and-matches-software-for-a-better-experience/) of solutions.
Linux packages are just archive files (like .zip and .rar) that contain the application code and the instructions on how to install the application,
where to place its configuration files, and what other packages it requires. The software that executes those instructions is called a package
manager.

Tip: Always make sure to use the right package format for your distribution. If you cant find a .deb package of an application,
but a .rpm one is available, its possible to convert between them (http://www.makeuseof.com/tag/easily-install-non-nativepackages-in-ubuntu-with-alien/).

What Is a Package Manager?


The desktop equivalent of an app store, a package manager is the central place to manage your Linux applications. Think of it as the
Add/Remove Applications dialog on Windows, but far more advanced. In fact, Windows users should be familiar with the concept, since
nowadays their OS has a package manager, too (http://www.makeuseof.com/tag/windows-gets-package-manager-download-softwarecentrally-via-oneget/).
Every Linux distribution comes with a package manager. If you dont like the default one, you can replace it (provided that the new one
supports your distros package format). The package manager is where youll search for, install, update, and remove applications. It can have
a command-line or a full graphical interface, and it stores the information about installed applications, their versions, and dependencies in a
local database. This helps it clean up all the leftovers automatically after you uninstall an app.

Tip: When you want to install a new Linux app, always search in your package manager first. If you cant find what youre
looking for there, turn to other useful resources (http://www.makeuseof.com/tag/linux-users-toolkit-discovering-new-apps/).

What Is a Repository?
Of course, your package manager cant just produce packages out of thin air. It needs to fetch information about available packages from a
location called the repository. Its a collection of packages for a particular Linux distribution. The repository can be a network location, a local
storage unit (a DVD, a USB drive, or a hard drive), or even a single file. Every distribution has its official repositories with thousands of
packages.
If an app is unavailable in the official repositories (or you just want the newest version straight from the developers), you can add new
repositories to your system. Make sure to choose the repository that matches your distributions version. New repositories can be added via
a dialog in your package manager, or by editing files with admin privileges.

Dpkg-based distributions store their repository information in the /etc/apt/sources.list file or in separate .list files in the
/etc/apt/sources.list.d/ directory.

For RPM distros, you can add new repositories under the [repository] section in the /etc/yum.conf file (or /etc/dnf/dnf.conf, if you
use DNF instead of Yum), or create .repo files in the /etc/yum.repos.d/ directory.
For users of Ubuntu and derivatives, there are also PPA (Personal Package Archive) repositories
(http://www.makeuseof.com/tag/repositories-package-management-ubuntu/) that host packages on Launchpad. Since anyone can create a
PPA, you should be careful when adding PPAs that are not officially supported by a project. Similar services for Fedora are called Copr
(https://copr.fedorainfracloud.org/) and Koji (http://koji.fedoraproject.org/koji/).

Tip: If you dont want to upgrade your Linux distribution, but still want to receive software updates, look for repositories labeled
as backports. They contain new versions of apps for old versions of a distribution.

How to Install Linux Apps


1. From the Terminal

A long time ago, this was the only way to install Linux apps. Package managers didnt have handy checkboxes and menus; they were
command-line utilities. They still exist today in fact, you use them every time you install something with a graphical package manager, since
its just a front-end for the command-line tool. You can use them directly if you want to speed things up, or if you simply prefer using the
terminal.
Dpkg is the name of the package management system, but also of the basic tool for handling .deb packages. Its sometimes referred to as a
low-level tool, and all other package utilities build upon its functionality. You can use it to install a single .deb package:
sudodpkgipackagename.deb
where -i stands for install. Dpkg cannot automatically resolve dependencies, but it can (re)configure packages and extract their content.
APT (Advanced Package Tool) has all the features of dpkg, and then some. It comprises several tools, such as apt-get, apt-cache, apt-addrepository, apt-file To install applications, you need apt-get:
sudoaptgetinstallpackagename
Another useful feature is simulation:
sudoaptgetinstallpackagenames
It shows you which packages will be added or removed, and which files will be configured, but it doesnt actually install anything.
Aptitude improves upon dpkg and APT, introducing a graphical interface in the terminal, which you either love or hate.

You can install apps from this interface or by typing commands:


sudoaptitudeinstallpackagename
Aptitude is similar to apt-get, but it provides more information and guidance while you manage packages. It treats automatically installed
packages and system upgrades a little differently than apt-get does, and it offers advanced search options. Aptitude can warn you about
conflicts when installing or removing packages, and show which packages are causing a problem thanks to the why command.
The situation is analogous on RPM-based distributions: the rpm command-line utility is roughly equivalent to dpkg, your APT is their Yum,
and aptitude corresponds to DNF.
DNF stands for Dandified Yum, a new version of Yum that was introduced in Fedora 18. Both Yum and DNF can automatically resolve
dependencies. The syntax for installing packages is simple and almost exactly the same with each tool:
rpmipackagename.rpm
yuminstallpackagename
dnfinstallpackagename
On openSUSE, you can use Zypper (https://doc.opensuse.org/documentation/html/openSUSE_114/opensusereference/cha.sw_cl.html#sec.rpm):
zypperinstallpackagename
zypperinstall/path/to/package.rpm
Mageia has its own wrapper for rpm called urpmi (https://wiki.mageia.org/en/URPMI) with equally simple commands for installation:
urpmipackagename
and searching:
urpmqpackagename
urpmqykeyword

On Arch Linux, you can use the default package manager (pacman) to install packages:
pacmanSpackagename
and search for applications in the repositories:
pacmanSskeyword
However, if you want to install something from the AUR (Arch User Repository), you need a separate tool called an AUR helper. AUR doesnt
contain binary packages that pacman can manage; instead, its a repository of recipes for applications that have to be built manually.
Yaourt is one of the most popular command-line AUR helpers because it can install both regular Arch Linux packages as well as those from
AUR. Its interactive, so you can type:
yaourtkeyword
and it will display the results as a numbered list. After you pick a number, Yaourt asks you what to do with the package. Alternatively, you can
just type:
yaourtSpackagename
to install the desired package. Yaourt takes care of the dependencies automatically.

Tip: To avoid typing the installation command every time you need a new app, create an alias
(http://www.makeuseof.com/tag/how-to-define-command-line-aliases-on-any-operating-system/) for it.

2. With a Graphical Package Manager

This is the recommended way to install Linux apps. Just fire up your package manager, find a package, mark it for installation, and confirm
changes. Youll be asked for the administrator password, so type it correctly.

The package manager will occasionally select several packages for installation. Those are your applications dependencies other packages
that it requires to work properly. Some package managers will recommend and mark related (but not obligatory) packages for installation.
Its possible to disable this behavior in the Settings/Preferences dialog.

Dpkg-based distributions usually ship Synaptic as the default package manager, though some offer Muon:

Ubuntu Software Center will be replaced by Gnome Software (https://wiki.gnome.org/Apps/Software) in the April 2016 release (Ubuntu
16.04). Linux Mint (http://www.makeuseof.com/tag/a-beginners-guide-to-managing-your-money-with-mint/) offers Synaptic and its own
product called Software Manager.
On RPM distributions you can find yumex (https://fedorahosted.org/yumex/), a front-end for yum:

There is also rpmdrake (https://rpmfind.net/linux/rpm2html/search.php?query=rpmdrake), which is a front-end for urpmi. On openSUSE you
can install applications with YaST (https://en.opensuse.org/YaST_Software_Management). Gentoo has a graphical front-end for emerge
called Porthole (http://porthole.sourceforge.net/):

On Arch Linux, you can use Pamac (https://wiki.manjaro.org/index.php?title=Pamac) or Octopi (https://octopiproject.wordpress.com/about/)


as a graphical alternative to yaourt:

Both tools can search and install packages from the official repositories as well as from the AUR.

Tip: If you want to install a new desktop environment or an office suite, look for its metapackage in the package manager. Its
much easier to install one metapackage than hunt for dozens of individual packages.

3. Use GDebi and Wajig

Users of dpkg-based distributions can play with two interesting tools. GDebi (https://apps.ubuntu.com/cat/applications/gdebi/) is a front-end
for APT that lets you install an application by double-clicking a .deb file. Unlike dpkg, GDebi can automatically install missing dependencies.
Its particularly useful when you want to install an app thats not in the repositories, but youve downloaded its .deb file.

Wajig (http://linux.togaware.com/survivor/Wajig_Overview.html) combines the powers of dpkg, apt-get, apt-cache, and a bunch of other
tools. Apart from installing apps and upgrading the system, Wajig can stop or start system services, convert RPM packages, and provide
detailed information about all packages in the repositories.

Tip: You can set GDebi as the default application for opening .deb files. Right-click a .deb file, select the Open with option,
find GDebi in the list, and confirm changes. Now your .deb files behave like .exe installers from Windows.

4. With a Self-Installer

This method applies to software thats not in the repositories and has to be downloaded from the developers website instead, such as
proprietary drivers. In some cases, this software is distributed as a self-extracting file with a .run or .bin extension. To install it, right-click the
file to access its Properties > Permissions dialog and mark it as executable.

Now you can either double-click the file to start the installation, or navigate to it in the terminal and type ./filename.run. The installation will
proceed automatically and the dialogs will look very similar to Windows installers.

Tip: Self-installers can also be bash scripts (files with the .sh extension). You can run them in the terminal by typing
./filename.sh.

5. Compile Them From Source

Its rare, but it happens. Sometimes the developers wont package an application for any distribution, instead providing the source code that
you need to compile yourself. The source should be a .tar archive file which you have to unpack. It contains helpful files called README
and/or INSTALL, so consult them first. The general recipe for compiling apps includes the following commands:
./configure
make
makeinstall
You would run them one after the other in the same directory where you extracted the source. However, exceptions and quirks might occur,
so you should read our more detailed guide on how to compile Linux apps. (http://www.makeuseof.com/tag/compile-install-tar-gz-tar-bz2files-ubuntu-linux/)

Tip: You can create .deb and .rpm packages from source to install the application with your regular package management
tools.

6. From Digital Distribution Clients

All previously mentioned methods apply to Linux games as well (yes, you can actually find games in the repositories). However, theres
another way to install games on Linux, and that is via digital distribution platforms (http://www.makeuseof.com/tag/6-digital-distributionservices-linux-gamers/) and their desktop clients. Steam is already available on Linux (http://www.makeuseof.com/tag/install-steam-startgaming-linux/), GOG Galaxy is in the making, and Itch.io (http://itch.io/) is a praiseworthy alternative.

The desktop clients tie in with your accounts, so youll need to register first if you want to organize your games.

Tip: Keep an eye on Steam deals (http://www.makeuseof.com/tag/5-ways-to-make-sure-you-get-the-best-deals-on-steamgames/) to grab great games without going bankrupt.

7) Use Application-Level Package Managers

If you want to get geeky, you can use application-level package managers alongside your default, system-level package manager. The
former are also known as programming language package managers. They contain libraries and supporting utilities for a programming
language, so if an application is written in that language, it can be easily distributed and installed with the package manager.
There are quite a few of them: pip (https://pip.pypa.io/en/stable/quickstart/) for Python, RubyGems (https://rubygems.org) for Ruby, npm
(https://www.npmjs.com/) for Node.js, NuGet (https://www.nuget.org/) for the Microsoft development platform Some apps are much
easier to install with this type of package manager because of a large number of dependencies that might not be available in your distros
repositories.

As you can see, there are several ways to install apps on Linux, each with its own (dis)advantages. When in doubt, use the package
manager, but dont forget there are other options. After all, its the variety of options that makes Linux so awesome.

What is your preferred method of installing Linux apps? Do you have any tips for Linux beginners? Share your thoughts in the
comments below.

Image Credits:

Yumex screenshot (https://en.wikipedia.org/wiki/File:Screenshot-Yum_Extender_2.0.4-1.png), Muon screenshot

(https://apps.ubuntu.com/cat/applications/muon/), Aptitude screenshot (https://en.wikipedia.org/wiki/File:Aptitude.png), Porthole screenshot (http://porthole.sourceforge.net/),


Octopi screenshot (https://octopiproject.wordpress.com/screenshots/), Itch.io screenshot. (https://itch.io/app)

Share

Tweet

Pin

Stumble

Bookmark

Mail (mailto:?body=http://www.makeuseof.com/tag/7-ways-install-apps-games-linux/&subject=7 Ways to Install Apps


and Games in Linux)

Vous aimerez peut-être aussi