Installing software

From LQWiki
(Redirected from Installing Software)
Jump to navigation Jump to search

This article explains program management, i.e. how you can install software to your Linux system.

How you should start

To avoid trouble, best practice recommends installing software using the distribution's package management system. Software for Linux usually comes in the form of a package. The type of package varies according to the distribution. For example, Ubuntu, Debian and Linux Mint use DEB packages while Fedora and OpenSUSE use RPM packages which means that the way of installing them is different. So, the first step for you is to find out your distribution. Then try to install the software by means of your distribution which means your distribution's "Package Management System". If that is not possible, you will have to download the software from the internet and install manually. If it is not availalble as a package then you have to download the source code and build it. Usually you don't have to take this step; It is reserved as a last resort although it was common in the past.

Before proceeding you may need to know what a package is.

To install software in Linux you need root privileges i.e the root password.

Package management systems:

  • Debian Package Management (apt). This system manages debian packages (.deb) for the following distributions:
- Debian and Debian-based distros such as Deepin.
- Ubuntu and its flavours such as Kubuntu, Lubuntu, Xubuntu, Ubuntu Mate, Ubuntu Budgie.
- Ubuntu-based Distros such as Linux Mint, ZorinOS, ElementaryOS, PopOS!.
  • Yum for Redhat, CentOS and Oracle Linux. This system manages RPM packages.
  • DNF for Fedora. Manages RPM packages.
  • Yast for SuSe and OpenSUSE. This system manages RPM packages.
  • Snap Packages: (not as comprehensive as the previous four) available for the following distros:
- Debian and the Debian-based distribution Deepin.
- Ubuntu and its flavours (Kubuntu, Lubuntu, Xubuntu)
- Ubuntu-based distros: Elementary OS, Zorin OS and Linux Mint.
- Arch Linux and the Arch-based distro Manjaro.
- OpenSUSE
- Fedora and CentOS
  • Flatpak: available for a wide range of distros.(not as comprehensive as the first four systems)
  • Appimage: equivalent to portable apps in Windows. Doesn't require installation to be used.(not as comprehensive as the first four systems).


If I have more than one option what should I choose?

The traditional package management systems such as Yum, DNF, Yast and APT (debian package) because most apps are ready to be installed through these systems and can be updated easily. Snap packages, flatpack packages and Appimages are not available for every app or library for the Linux system at the moment. So, if you are using Ubuntu the options you have are APT, snap, flatpack and Appimage. You should go for the Debian Package Management System APT.


Do I have to type/memorize commands?

Most of the time NO, You can use GUI Tools which are programs that have a graphical interface:

If you are using Ubuntu or its derivatives (see above) you can use Synaptic or Ubuntu Software Center.

If you are using Debian you can use Gnome Software or Synaptic.

If you are using Linux Mint you can use Synaptic or Software Manager (mintInstall).

Note that Synaptic is more suitable for advanced users while Ubuntu Software Center and Mint Software Manager are suitable for beginners.

Installing using graphical tools (GUI)

Ubuntu

Use Ubuntu Software

Or use Synaptic, which is more advanced. See this

Linux Mint

The easiest way to install software in Linux Mint is to use the Software Manager.

Open the menu and select “Software Manager”.

The Software Manager lets you browse the software made available for Linux Mint. You can browse by category, search by keyword or sort the software by rating and popularity.

Debian

Use Synaptic Package Manager or Gnome Software.

Manjaro

There are two options: Octopi and Pamac. See this

Fedora

Option 1:

Thanks to this.

Step 1: Launch the Gnome Software application. You can open it up by pressing the Windows key on your keyboard, typing “Software” into the search box and selecting the shopping bag icon.

Step 2: When the app finishes starting up, you’ll see a welcome screen. Look over the welcome messages. After that, click on an app category and start browsing for an application you’d like to install. Alternatively, find the search box and locate a program that way.

Step 3: Once you’ve found a program through the category browser or the search results in Gnome Software, click on it with the mouse. Soon after, you’ll be taken to the app’s software page.

Step 4: On the app’s software page, locate the “Install” button and click on it with your mouse. Selecting the installation button will prompt you to enter your system password. Then, after entering the password correctly, Gnome Software will go out and install the program.

Option 2:

Use dnfdragora. To install it use the following command in a terminal:

 dnf install dnfdragora-gui 

Installing from the command line

For example, if you want to install firefox, this is how you install it:

Fedora

 dnf install firefox 

For more information on DNF see this.

Debian, Ubuntu, Kubuntu, Lubuntu, Xubuntu, Ubuntu Mate, Ubuntu Budgie, Linux Mint, PopOS!, ElementaryOS, ZorinOS

 sudo apt-get install firefox 

or

 sudo apt install firefox 

To find packages whose description contain word

 sudo apt search word 

or

 sudo apt-cache search word 

OpenSUSE

 yast2 -i firefox 

If you want a list of installable packages (searchable), try

 yast2 sw_single 

Arch Linux and Manjaro

Warning: Never install a package without updating the system first. On a rolling release this can lead to an unbootable system. see this

 pacman -S firefox 

For more information on Pacman see this.

Gentoo (for advanced users)

 emerge firefox paludis -i firefox 

Slackware

However Slackware doesn't have its own Package Manager but you can make use of Slackbuilds scripts to compile and install your software. Download the source package and the Slackbuilds scripts from Slackbuilds. There is a direct link to source tarball to each application.

Unpack the Slackbuilds tarball using
 tar -xf slackbuilds_tarball.tar.gz 
Example:
 tar -xf recordmydesktop.tar.gz 
You will have a directory named recordmydesktop.
Copy the source tarball to the Slackbuild directory
 cp -v recordmydesktop-0.3.8.1.tar.gz recordmydesktop/ 
Change your directory to recordmydesktop
 cd recordmydesktop/ 
Make the slackbuild script executable if necessary
 chmod +x recordmydesktop.Slackbuild 
Run the script using
 ./recordmydesktop.Slackbuild 
If the compilation process is completed without errors, the finished package will be created in /tmp directory. Change your directory to /tmp
 cd /tmp 
and install the package using installpkg. The finished package will end with .tgz extension
 installpkg recordmydesktop.tgz 
PS: You have to log in as root to install package

Installing manually

If your distribution does not provide the package you want to install, there might be other ways to install it that you should be aware of:

  • DEB - the Debian Package Format (.deb). This is used by Debian and Debian-based distributions, such as Ubuntu and Linux Mint. You can install these packages directly from the command line or you can install Gdebi front end which will handle the installation of the .deb packages. Example: Vivaldi web browser and Google Web Designer.
  • .run files such as Foxit Pdf Reader, Selene Media Converter, Savage 2, some games in the Humble Indie Bundle and NVIDIA drivers.
  • .bin files such as IBM SPSS.
  • .sh files such as PDF Studio and games from GOG.com
  • CPAN - an installation mechanism independent of the distribution, but dependent on the programming language; only available for Perl.

Many applications come in packages that are not available in the repositories especially if the application in question is not open source. Examples include but not limited to: WPS office, Google Chrome, Softmaker FreeOffice for Linux and Google Web Designer.

Keeping up-to-date

Debian, Ubuntu, Kubuntu, Lubuntu, Ubuntu Mate, Xubuntu, Ubuntu Budgie, Linux Mint, PopOS!, ElementaryOS, ZorinOS

Upgradable packages on the system can be upgraded by following sequence of commands:

sudo apt-get update sudo apt-get upgrade 

or

 sudo apt update sudo apt upgrade 

Fedora

Comes with another updating tool known as DNF, and this can be invoked via the command line such as,

 dnf check-update 

To upgrade your current system,

 dnf upgrade 

can be invoked.

Suse Linux & OpenSUSE

Can be updated by calling the yast online updater YOU:

 you 

Arch Linux and Manjaro

To update the system type:

 sudo pacman -Syu 

Compilation from source

Main article: Compilation from source.

If the above options are not available, you will have to compile your software manually. This will be considered only as a last resort.

Typically, you will

Some packages require to issue to test installation

See Also