- slide 1 of 3
Installing software on a Linux machine is often as simple as typing a single line into a terminal. For Windows users reluctant to try Linux, this usually comes as a surprise. The overall assumption is that anything Linux does is either less effective or not as user-friendly as it would be in Windows. There are two main methods of installing software in Linux: source and package managers.
- slide 2 of 3
Source code installs have a few advantages in the form of customization and hardware detection when they are built. These advantages are often negligible to average users who just want to install and use the software rather than alter it.
Most software is quite easy to install using the terminal commands ‘./config’, ‘make’, and ‘make install’ in the software’s directory while having root privileges. This will detect compiling information, build the code then place it in the proper directories. Most often there will be a file called “INSTALL" in the directory used to install the software. This usually gives more specific information on how to compile and run the setup.
That brings us to the main shortfall of installing software from source code, the dependencies. Every piece of software you install depends on one thing or another whether it be a C++ compiler, a library or another piece of software. This can be quite a task to take on when a piece of software has a mound of dependencies which would all have to be found and installed before continuing. Luckily there is a much easier way…
- slide 3 of 3
One of the best things to ever happen to Linux was the package manager. What a package manager does is it downloads, sets up and installs the software and all its needed dependencies. So instead of downloading a dozen packages manually and compiling all of them from source you can now install everything using one simple command.
Depending on your Linux distribution, there are different management systems used to retrieve and install software. Debian and Debian-based distributions such as Ubuntu and Mint use ‘apt’; Red Hat and Fedora use ‘yum’; and Mandriva uses ‘urpmi’. Here are samples of the simple commands to install software using each of these (switching “gcc" with the package you would like to install):
- apt-get install gcc
- yum install gcc
- urpmi gcc
It’s also quite easy to search for packages using these commands:
- apt-cache search gcc
- yum search gcc
- urpmi –y gcc
Another advantage to package managers is their graphical frontends. Although not as quick as typing a single line in terminal, graphical interfaces such as Synaptic Package Manager for APT, Yum Extender for Yum and RPMDrake for URPMI can be used.
One disadvantage to package managers is when the sources used don’t have the package you want. In that case, you might have to alter the package manager’s resource file or install using the source code like previously explained.