Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
What is the best place to install user apps?

I've downloaded a .tar.gz and ran sudo sh It's asking me where to install the program to. I don't want it cluttering up my home directory, and I want it to be available in the applications menu. Where should I put it? /usr/bin? /usr/local/bin? Or are those only for single binaries? This program wants to create a folder.

share|improve this question

marked as duplicate by Oli Aug 18 '11 at 17:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

There's a good conversation on this issue over on unix.stackexchange:… – andrewsomething Oct 13 '10 at 18:27
up vote 32 down vote accepted

First of all which Application are you installing? It is always preferable to install through the native Package Management as the Package Manager will handle the location, updates, paths and the launchers (shortcuts) for you. Also updates would be handled. You should ideally search for the package in the Software Center or Synaptic. PPAs can be used if the software is not in the default repos.

However if you are sure of installing this package, use /opt directory, /opt/appname for example. /opt would be suitable for this kind of installs. Launchers may or may not be created depending on the installer. You can create a launcher manually if the installer doesn't create. You may also use $HOME/bin for putting all your apps.

share|improve this answer
Komodo Edit 6. I don't see it in the repos. – mpen Oct 13 '10 at 18:01
In that case, Simply use /opt/komodo, or any subdirectory within /opt. This installer will create a launcher for you in the Menu (just tested). – LFC_fan Oct 13 '10 at 18:19
I'd go with /opt as well: – dr Hannibal Lecter Oct 13 '10 at 18:22
Damn it, i JUST read this and installed Komodo 6 a couple days ago and it's not in the default home directory, how can I move it and make sure all of the required files come along or still work? – Oscar Godson Oct 13 '10 at 18:51

For all path-related questions, the Linux Filesystem Hierarchy Standard is the definitive reference.

If the program needs to create a folder, then /usr/local is the directory of choice; according to the FHS:

The /usr/local hierarchy is for use by the system administrator when installing software locally.

Avoid placing your local binaries directly under /usr, because according to the FHS, that hierarchy is reserved for the software provided by the Linux distribution (in this case, Ubuntu).

Note that, placing a binary in /usr/local/bin (or any other bin directory) will not create a menu entry; for that you have to provide a .desktop file and install it in the appropriate directory with the xdg-desktop-menu command.

share|improve this answer
Well said. +1 from me – chiggsy Dec 10 '10 at 10:15
I disagree. According to FHS, /usr/local should not contain extra directories beyond the ones specified, and /usr/local/bin should only contain binaries. Creating a folder in /usr/local or /usr/local/bin is a violation of FHS. /opt should be used in this case. – jordanbtucker Mar 28 '15 at 20:52
@jordanbtucker Hmmm, no the FHS states that: "No other directories, except those listed below, may be in /usr/local after first installing a FHS-compliant system." Actually, it's pretty explicit that /usr/local is for locally-installed software: "The /usr/local hierarchy is for use by the system administrator when installing software locally. [...] Locally installed software must be placed within /usr/local rather than /usr unless [...] to replace or upgrade software in /usr." – Riccardo Murri Mar 30 '15 at 8:45
@RiccardoMurri Ah, thanks for the clarification. That is an important difference. – jordanbtucker Mar 30 '15 at 15:58

Usually you would put it in /usr, binaries in /usr/bin if it's something bigger it would go to /opt.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.