Chapter 6: How do I get software for Linux?

6. Software for everyone!

Open Source LogoAs discussed in later chapters, software in Linux is often free of charge, some of the most famous software titles around are available for Linux. Most Linux distributions these days offer simple ways to download and install software which are bundled up and ready to use in ‘packages’. Sometimes, other software can be obtained in other formats too, so this chapter talks about all of the different ways you can use and obtain Linux software.

This chapter talks a little about the theory behind how software is distributed, and why. If you intend on using Linux for a while, it’s probably quite beneficial to know this, however if you are just getting started out and want to install some software, jump to Chapter 7, to find out how to install software.

6.1 How software is distributed in Linux

If you are a Windows or Mac user, you will be used to software being delivered to you in binary format. In Windows, the most common binary format you will come across is the exe file. A binary file is a file that has already been compiled from the original source code, to a binary (or closed source) format. You can’t see the code inside the binary file, to the human eye, it’s a big blob of random gobbledy-gook, that only your computer can read. This is done by the application developers (or programmers) of the software. It makes it ready for your operating system, and it also usually bundles in a lot of ancillary software which help it work. This ancillary software are commonly referred to as ‘libraries’. Some times this can make the software more ‘bloated’ than it might otherwise need to be, and it doesn’t let other people see bugs or security issues in the software.

Linux, on the other hand began with a guiding principal that software should be free, as in free speech (not necessarily as in cost). To make software open (read free/libre), software authors needed to ensure that the software that was shipped was also made available in the original source code format, so that if you felt like contributing to the software, whether to fix a bug, add a feature, or make a derivative (fork) of the application, you could do so at will. As long as you too, kept the source code freely available. This is the guiding principal behind the GNU GPL (General Public License), and is the license that is most commonly used with Linux based software.

For ease of installation, most of the software you will obtain in Linux these days though, will come as ‘packages’. These are pre-compiled bundles of software. The source code, however, is always available as a companion package, should you wish to see it.

Tux Tip: Note that if you wanted to turn the source code (written in human readable text form), into usable software for your computer (a binary), you have to use an app called a compiler. This is an advanced topic which will not be covered in this chapter.

6.2 A little word on Dependencies

Feel free to skip this section if you aren’t interested in the details about why Linux software packages are a better idea than big binary files found in Windows and MacOS.

As noted earlier, in Windows and Mac OS, a lot of software comes in one big binary file (a ‘blob’ if you will). Most of the other tools or software that it needs (called dependencies), are usually bundled up inside those binaries. Sadly though, sometimes the same libraries are already installed on the operating system, put there by other applications before. This means that you might have the same or different versions of libraries kicking around on your PC taking up space and making it slower than you’d probably like.

Linux packages are often a lot smaller, because they rely on the other dependencies from other software to be installed only once. Take for example, you might want to install a hypothetical app called ‘liarfox’. It’s available for Windows and Linux. The liarfox package might be 75MB in size in Linux, versus a 250MB in Windows. When you install liarfox in Linux, it also says it’s going to download another 100MB in other packages too, making the total installed on Linux 175MB. Still a little lighter than Windows. But the good thing is that in the end, it didn’t need to download all 100MB of extra packages. Why? Because they were already installed and in use by other software on the system. The dependencies had already been met.

6.3 Using binary packages

Software in Linux today is packaged up for easy installation in most cases. The most common formats are as follows:

RPM Logo

.rpm files: Redhat Package Manager

Software that is in Red Hat Package Manager format is used by Red Hat, Fedora Core, SuSE and CentOS variants of Linux.

 

deb

.deb files:

Debian package formats are used by Debian GNU/Linux, Ubuntu, Linux Mint and other variants.

tar.gz icon

Tar packages can contain pre-compiled binaries for specific systems, or can also contain source code. If you have used ZIP files or RAR files in Windows or MacOS, then tar.gz files are essentially the same thing. Anything can be stored within them.

In the case of deb files and rpm files, most modern day Linux distributions have what is known as a package manager. This means that you don’t need to worry about downloading or even dealing with installing individual packages, and their dependencies. The packages (.deb and .rpm files) are installed for you, at the click of a button (or the type of one command).

6.5 Obtaining the software that came with your distribution

Back as far as 2005, Ubuntu Linux introduced the Ubuntu Application Store. Note that this was before the iPhone and definitely before the Apple ‘App Store’. It’s a seriously easy way to search for, download and install software. App stores are the most user friendly way to obtain software in Linux these days. Most of the popular Linux distributions have an equivalent app store. For example, Fedora uses a menu option that conveniently says “Add/Remove Software”.

 

Ubuntu's Software Centre

Ubuntu Software Centre shows how easy it is to download and install software in Linux.

This almost sounds too good to be true, but there is no such thing as a perfect world! Exceptions exist. For the software title that you require to be available via the ‘App Store’, means that two things have happened:

a) The Linux distribution vendor (eg, Canonical and/or Debian, in the case of Ubuntu), need to be aware that the software exists.

b) it’s been vetted officially to be represented in the ‘main/approved’ distribution channel (repository) of the Linux distribution. Note, If the software is acknowledged by the distribution vendor, it may still be available in an alternate distribution channel, which may have to be additionally enabled.

If both of the above cases are not satisfied, then, like in the Windows or Mac OS world, you need to go off and google for the software vendor’s website and find the download yourself. We talked earlier in this chapter about dependencies. When you download ‘unofficial’ software like this, and you install it, it can’t be guaranteed that it will work with your Linux distribution because the software it depends upon (libraries, often) may not exist within your Linux distribution. If you ever hear of the term ‘Dependency Hell’, this is what people are talking about!

Tux tip: If you are installing software from websites, you’ll often download it as .deb, .rpm or even .tar.gz format. You’ll need to double-click the downloaded file to launch the installer, or with .tar.gz, decompress the file and go to a command line to install it from there. If you want or need to install deb or rpm packages from the command line, you can also do that too, more information on that in Chapter 7.

This matter of obtaining ‘official’ software from a repository can often be difficult to grasp for first time Linux users, as it’s a different way to get software, however thanks to commonality these days of the Mac OS App Store and the Microsoft Store, it’s getting to be a more understood way to obtain software.

6.6 Okay, I got the software, Now how do I install it?!

A- ha! For that, you’ll need to move on to the next chapter!

6.7 Advanced Topic: Other ways of getting software

This is an advanced section for those of you that want to get software from other sources/websites. It is not required reading for most Linux users, or new users but is here for completeness sake.

.tar.gz

As mentioned, there is the traditional .tar.gz format. Most of the time, you will find that the .tar or .tar.gz format is used to zip up source code format software, a .tar.gz file is often referred to as a tarball. Tarballs are double-archived files. This means, that they’re first archived with a tool called tar (the standard unix archiving tool), and then to zip or compress the file, the tar file is then zipped up with gzip (the GNU Zip tool, which is akin to PKZIP or RAR).

Tux, The Linux Mascot

Tux Tip

You can still unzip/zip WinZip/PKZIP compressed files with Linux, using the unzip and zip tools, rather than gunzip and gzip.
Furthermore, the popular desktop systems, including KDE and GNOME all have a GUI tool built in to handle .gz and .zip files effortlessly!

To decompress (unzip) a tarball at the command prompt, type: $ tar zxvf filename.tar.gz

If you are using Arch Linux, the officially bundled binary packages are distributed in .tar.gz format, although they are usually installed using the pacman package manager.

Slackware Linux also bundles its pre-compiled binaries in .tar.gz files, but in a specific archive layout.

ebuild

The ebuild format is a specialised bash script which is used by Gentoo Linux which automates compilation and installation of software packages. It is used within the Portage Software Management system, as well as the emerge tool.

SNAP

Snappy is a new package management system made by Canonical for Ubuntu phone operating system, as well as Ubuntu Desktop and package most dependencies within one package. It is now available in other distributions including Arch and Fedora, and could become the standard package format in the future.

Other non Linux packages: PKG, APK, APPX

For completeness, other operating systems have made packages, or are starting to use packages:

The PKG format is used by Apple on the MacOS, iOS platforms, generally transparently. It is also used by Sony on the Playstation 3, and in other Unix like operating systems, such as Solaris, UNIX System V, Symbian and BeOS.

The APK format is the Android package format and is used on Android mobile phones, tablets and other smart devices.

The APPX format is used by Microsoft Windows 8 and above, as well as Windows phone, mainly within the Microsoft Store, transparently to the user.

Still can’t find the software you are looking for? Use Google!

It’s happened to the best of us, and in time, it may happen to you. If you are looking for a package, but you can’t find one on the authors web page, nor on sites like rpm.pbone.net. You can only find the tarball and you just can’t find it anywhere.
Well, you would be surprised at who actually makes up these packages from tar files. Mainly you’ll find that distribution vendors package them, but you’ll find other people out there doing it for the hell of it, to help you and the rest of us out. This generally happens if the program is a dog to compile as a tarball.

A word to the wise though: If you are downloading an RPM or DEB package from a third-party, it could have been tampered with, or worse, wreak havoc with your Linux installation – use third party binaries as a last resort and with caution!

2 Comments on "Chapter 6: How do I get software for Linux?"

  1. After reading chapters 1-5 I was being convinced to adopt Linux; then I read chapter 6 and was completely baffled. It is this kind of geeky technicalities that turns people off Linux. Why does loading software look so complex?

    • Thanks Tony. Ill perhaps update chapter 6 to change the order and reword anything I can see that looks complex. Chapter 6 is a wider intro to the different types of software packages available, whilst chapter 7 brings the relevance into practice, so perhaps 6 is the dry theory, 7 being the easier real world implementation of that theory. Installing software in Linux today is arguably easier than in Windows.

Leave a Reply