Linux For Newbies/Obtaining and Installing Applications
From Wikibooks, the open-content textbooks collection
Contents |
[edit] Obtaining and Installing Applications
There are many thousands of programs available for a Linux system and for several of the major distributions many thousands of these will be available in "pre-built" (ready to run) form through the appropriate package management system.
Sometimes, pre-built binaries are not available or suitable, and in this case it may be required to build the program from its source code. Instructions for how to do this are normally included with the program, but most programs can be compiled using the commands:
./configure make
Normally you can then install it to the computer by using the following command as the root user:
make install
[edit] Package Managers
Package managers simplify the task of organizing the software installed on the system. For example, the Synaptic package manager for Debian.
[edit] Debian
For example, on a Debian, or Debian-based system, it might be possible to install a program by simply typing a command such as:
apt-get install mtools
In this case, the Debian package manager "apt-get", will check to see if such a program as "mtools" is available, and if so, it will check whether there are any other pre-requisite programs (dependencies) required for this program to run. If there are any dependencies, the package manger will check to see if these are available and in turn whether each of these has any dependencies, and so on, thus building a list of the required software to successfully run the required program. The package manager checks to see which of these are already installed, and for those not installed, it automatically downloads and installs each one. Ubuntu Linux (which is based on Debian Linux) can use this method, or it can use the method:
sudo apt-get install "whatever"
[edit] Red Hat
Or, on a Red Hat-based system, such as Fedora Core, you can use the 'Redhat Package Manager' (rpm). To install something, download an rpm package, and type a command like:
rpm -ihv mtools.rpm
To upgrade a package, use:
rpm -Uhv mtools.rpm
And to search your packages to find out which version of something you've got, do something like:
rpm -qa | grep mtools
[edit] Building Programs from Source
Sometimes it is necessary or desirable to build a program's executable binaries from the source code provided by the programmer or programming team. Perhaps there are no pre-built binaries available for your system, or perhaps you have some special configuration or optimization requirements that are not available in pre-built form.
The source code for a program is normally provided in a single archive file and the first step is to download this file, or locate and copy it from (for example) a CD or DVD disk.
Once you have obtained the source code for a program there is a typical sequence of steps normally required: (note: anything in square brackets you replace with whatever is applicable)
- Open a command line (console) session
- cd to the directory containing the archive: cd /root/Desktop/[filename.tar.gz]
- Decompress
- If the archive ends in .tar.gz or .tgz then type in this command: gzip -d [filename.tar.gz]
- If the archive ends in .tar.bz then type in this command: bzip2 -d [filename.tar.bz2]
- Separate the archive by typing in: tar -xvf [archivename.tar]
- cd to the uncompressed archive by typing in: cd [progname]
At this stage, you have unpacked the files from the archive and they should now be examined for any documentation files, typically called README or INSTALL. These files will normally give specific installation and configuration instruction for the program. These typically consist of:
- configure it by typing in: ./configure
- make it: make
For the final installation steps, it is usually necessary to have root (super user) privileges. These can be obtained by issuing the su command and entering the password when prompted.
- install it: make install
- now run it by typing: [progname]
[edit] Various applications
(list of high quality, useful free software/Linux software, some info on them, also ordered by kind, so people who wonder what they need to do something (for instance, make a spreadsheet) can find it easily)
One thing that holds many people back from the switch to Linux is they think that their programs and more importantly the files they have created won't work. Whilst you cannot run Windows programs directly in a Linux environment, there is almost always an Open Source alternative to a “paid for” application. The majority of Open Source software does a good job at being able to open files created in Windows; for example you can easily open a Word document in OpenOffice.org's word processor, edit the file with OpenOffice and then save the file in a Word format that other people with Word can view just like the original. There is also software such as WINE that allows programs compiled for Microsoft Windows to be run under a Unix-like system.
[edit] Games
- FreeCiv - Turn based strategy game that is "just like" Civilization II.
- TuxRacer - Race down a snowy hill on Tux's belly and catch fish.
[edit] Office/Productivity
- OpenOffice.org - Free Office suite comparable to and compatible with Microsoft Office.
- The GIMP - a graphics editing program for Linux comparable to PaintShop Pro.
[edit] Network/Internet
- Pidgin IM - IM client that can handle multiple protocols (AIM and ICQ (Oscar protocol), MSN Messenger, Yahoo!, IRC, Jabber, Gadu-Gadu, SILC, GroupWise Messenger, and Zephyr networks).
- aMSN - a Linux alternative to MSN Messenger
- Mozilla Firefox - A cross-platform web browser replacing Internet Explorer that provides tabbed browsing, increased security and customization (extensions).
- Mozilla Thunderbird - A cross-platform email client replacing Microsoft Outlook.
- Mozilla Internet Suite - the GNU licensed web suite including a web browser, email client, calendar, web debugger, plugins, an IRC chat client and an FTP client.
[edit] Multi-Media/Audio/Video
- VideoLan/VLC - a cross-platform audio/video player which will play just about any format and codec. Replaces QuickTime, Windows Media Player and DVD Player software. VLC also has extensive video/audio streaming and transcoding facilities.
- MPlayer - similar to VLC but without the streaming options.
- xine - another free multimedia player
Here is a small list of Linux programs and their Windows counterpart.