Introduction

A question many Linux newbies ask is how can they install software. Nearly all Windows programs come with a nice installation program that unpacks everything on their hard drive, and then they're good to go. Well, on Linux it's not quite so easy, but it's not exactly hard.

Downloading software from a website

First of all, you'll need to find a package you wish to install. There's everything, from games to media players to development software. Once you find something, look in the downloads section. There will likely be a number of packages listed, such as RPM. Debian/.deb, etc. What this means is that there's multiple binaries (compiled software) for different Linux distributions. Basically, you need to pick the correct one which matches your distribution.

Unfortunately, there are many (too many!) Linux distributions. I can only cover Red Hat/Fedora Linux, Debian, and its derivatives (e.g. Ubuntu, Yellow Dog, etc.). So, if you're using Red Hat or Fedora Linux, you're going to want to download a .rpm file. Debian users should download a .deb file.

You might notice that the file you download is quite small. It usually takes only a few seconds to download on a broadband internet connection. So you might ask, "How can that file possibly hold that program?" Well, it can't. It only contains packaging information which your distribution uses to download the actual program binary. So let's get our hands dirty with the command line and install this program!

Find some sort of terminal application (such as Konsole) and open it. You'll see a prompt sitting there, waiting for you to type in a command. First of all, let's navigate to the desktop:

cd ~/Desktop

Your prompt will change to reflect the working directory. Now that you're in the desktop, we can enter the installation command.

For Red Hat
You're going to use the RedHat Package Manager (RPM) for this. Simply enter the following:

su
[enter your root password here; it'll be invisible]
rpm -Uvh my_program.rpm

Replacing my_program.rpm with the name of the rpm file you downloaded. Press enter, and expect to wait while RPM downloads the necessary data and installs the program.

For Debian and derivatives:

sudo dpkg -i my_program.deb
(enter your regular password)

(If for some reason sudo didn't work)

su
[enter root password]
dpkg -i my_program.deb

Installing from a package manager

Another way of installing programs in Linux is to use the built-in package manager. A huge number of Linux distributions come with the program Synaptic Package Manager, which is an intuitive, easy-to-use program which is pretty self-explanatory. You choose a package you wish to install, mark it for installation, and then repeat for any other packages. Click "Apply" to add these changes.

For those of you Red Hat users, you can use the "Package Management" utility to install packages, which is basically a GUI front-end of the command line RPM tool. It allows you to select various apps you wish to install, and then you can choose "Update" to get and install the packages.

Removing packages

Undoubtedly, you'll want to remove some of those packages you've installed. You can use your GUI package manager to uninstall packages, or you can use the command line. I'll explain the command line method, since this is more fun!

Red Hat
If you know the exact name of the package, you can remove it like this:

rpm -e my_program

If you wish to know the installation status about a specific package, use the following:

rpm -q my_program

Debian
Using apt-get to uninstall packages is really easy. All you need to do is something like this to remove a package:

apt-get remove my_program

Conclusion

Installing packages on Linux is a very broad subject that is very difficult to cover completely. I have provided a simple overview to give you a better understanding, and you should definitely read up on some more links if you're serious about installing software on Linux. Consider visiting these links:

You will almost certainly encounter software that doesn't provide binaries for your specific distribution. Instead, they offer source code in a tar.gz or tar.bz2 file. Source code needs to be compiled, is a whole topic of its own, and is best left for another tutorial.

jingda commented: Nice sticky +6

Recommended Answers

All 17 Replies

nice post usally for me it always ends up
./configure
make install
some how

for tar packages
tar -ivf program name
cd the current directory look if you have such a file configure
write the following in the command line
./config
make ;
make install;

well, most importantly, read INSTALL.

"So you might ask, "How can that file possibly hold that program?" Well, it can't. It only contains packaging information which your distribution uses to download the actual program binary."

Not usually... Most packages only contain part of the programme, like the main programme and its menus. The rest comes form libraries already installed on the machine or that need to be installed beforehand or by the package manager.

This reveals two huge differences between GNU/Linux and that other OS. GNU/Linux uses FLOSS which makes it easy for the writer of a programme to re-use other FLOSS packages like libraries to display stuff, searching, sorting, etc. The writer needs only to write a small part of the whole programme. With "proprietary"/closed software, the writer has to write it all or pay others a licence fee for the libraries. This makes FLOSS much easier to produce quickly and at low cost. Further, a property of UNIX-like systems is that one copy of a library in RAM will satisfy many applications and processes even for multiple users. This shared memory means that a PC can run many more processes/applications/users simultaneously than that other OS. Typically, one needs 1/3 the number of servers to do a job with GNU/Linux and an ordinary PC that struggles to serve a single user with Vista can please dozens connected from thin clients with GNU/Linux.

So, what seems problematic is a blessing in disguise. If you stick with a large distribution with a large repository, you are laughing because all the packages are designed and tested to install smoothly. Also, you can update all your OS and applications from a single source. How cool is that?

One of the most difficult things to get used to in the Linux world is installing new software packages. In the world of Windows, every program comes with a Setup.exe program that asks you some very easy questions and takes care of the job for you..

thanks your post comment very nise.
Contemplation like lapping waves upon an ageless shore brings clarity and peace of mind

Thanks
---------------------------

how to install visual studio 2008 pro

I want to install more games on my untuntu 10.10 ,but I don't know where to find them ,can you show me how to get it?

how i can install photoshop in Ubuntu ..

Some other Linux distributions have their own way of managing packages, notably SUSE. SUSE uses RPM as its native package format, but has its own high level tool to manage system software installation.

SUSE Linux uses a tool called yast (which allegedly is an acronym for Yet Another Setup Tool) to perform all kinds of system administration tasks, including installing software. Having no experience with it, I cannot give you more details. man yast for help.

how i can install photoshop in Ubuntu ..

You install WINE and then install the Abobe suite - works like a charm.

Some other Linux distributions have their own way of managing packages, notably SUSE. SUSE uses RPM as its native package format, but has its own high level tool to manage system software installation.

SUSE Linux uses a tool called yast (which allegedly is an acronym for Yet Another Setup Tool) to perform all kinds of system administration tasks, including installing software. Having no experience with it, I cannot give you more details. man yast for help.

While we're on the topic, SuSE is a fork of Slackware, the oldest Linux Distro, and so I was a bit disappointed that Slackware package management wasn't covered in the article.

Bascially, installing in Slackware, in a manner analogous to that of rpm, would be quite simply:

# installpkg <package_name>

That's all there is to it. It is without a doubt the most straight forward of all the methods mentioned so far.

You want to uninstall a package? Then:

removepkg <package_name>

And if you want to upgrade a package to the newer version, simply:

upgradepkg <package_name>

You can get Slackware at http://Slackware.com

Nothing could be simpler.

I hope that helps :)

how i can install photoshop in Ubuntu ..

Why would you want to install Photoshop, anyway? Gimp is almost as powerful. In fact, depending on what you do and what custom tools you paid for, Gimp might be exactly as capable as PS and it's free.

But if you're stuck with PS, you can try Sun's VirtualBox, create yourself a Windows virtual machine, buy Win (XP and up), buy Photoshop and install it on the virtual machine.

With all that buying, a free Gimp on free Ubuntu still looks like a better deal to me...

yup :)

Couple Gimp with Inkscape and you have a winning combination that is perhaps actually better than having to deal with those proprietary systems.

My 14yr old daughter didn't even know what photoshop was until two years ago (being a Pokemon master and all), and when I finally fired it up for her she turned her nose up at it and embraced Gimp and Inkscape with renewed vigor.

This information is good and help me alot......thanks :)

ubuntu is slow delete it get another os now!!!!!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.