The preferred way of installing an application under Ubuntu is via apt-get or aptitude, personally I use aptitude due to that I've had better experiences with it overall, but the decision between using apt-get or aptitude is entirely up to you.
Only Aptitude can search for applications though, so let's say you'd like to install Pidgin
, you'd want search for it to get the exact name:
aptitude search pidgin
In this case, the package name is just pidgin
, however, you'll see a lot of plugins and other stuff for Pidgin. To install Pidgin (or any of the other things seen here), you'd type:
sudo aptitude install pidgin
So, pidgin is just the exact name of the thing I wanted to install, I could take the name of anything else from the list, and it would install fine (except if it was already installed).
In other cases, the specific applications might not be available via aptitude, and then you have a few options to choose from usually:
- Compile from source
- Find .deb package
- Adding the PPA
- Binary installer
Many applications offers a .deb package, which is basically what an .exe is for Windows, just simpler. A .deb is a Debian software package, kind of a binary package for Debian based systems (such as Ubuntu) You simply double click it from Nautilus
, and then you enter your password, and click "Install Package", extremely simple! However, note that using this method you might not be able to update it via aptitude later on, however, the application might have it's own update feature, but that's rare. It's always preferred to add the PPA, then the application can be updated via aptitude, more on that in a second!
Compiling from source is another option, which can require a little more effort, normally an INSTALL
file would be available in the source, in which instructions would be present, such as dependencies for the install. If a specific application might have a dependency, you would normally install this by aptitude, just like showed above, however, it can be a real jungle when dependencies depends on other packages. Then for compiling, the usual procedure is:
./configure
make
sudo make install
It's rare you have to do this though, it's usually only when you want bleeding-edge software, or small open source projects to be compiled.
This way is usually preffered over the two others, you add the PPA (personal package archive) to your list of PPAs. For instance, Shutter has a PPA. You add the PPA to your software sources (for instructions, check the shutter guide, it's pretty good), and then you run:
sudo aptitude update
To update the software sources.
And then you can simply install it by running:
sudo aptitude install shutter
There are probably a few other ways applications can be installed, usually if you download closed-source software, you would have a binary file (or .sh file), and then it's simply a matter of typing:
./filename
To start the application (or installation wizard).
Another thing is, sometimes you might end up with a .exe
file which people say should run under Linux. Sometimes you can install it via Wine
, in other cases you can run it via Mono (you might have to install Mono, do that via aptitude!):
mono file.exe
Best Answer
Hmm. This isn't really true (or I misunderstood what you meant). Usually programs are installed using Ubuntu's package management system (deb packages), and they are available system-wide for all users. This is by far the preferred method of installing software.
When (on rare occasions) installing something outside the package management system, I tend to use
/usr/local/programs
, and create specific subfolders there for different programs. Often, I'll also put a symlink (or simple startup script) under/usr/local/bin
to make it easier to launch these applications. Of course,/opt
or any other location would do just as well, as long as you make sure all users can access the files and directories (as Bobby pointed out).If you want such programs to appear in the start menu of your desktop environment, you'll need to take care of it yourself. E.g. this shows how to add entries (for one user?), assuming you use Gnome. I'm sure there's a way to add it for all users, but off the top of my head I'm not sure how; maybe others can help you there.