Best place to install apps [duplicate]

Solution 1:

Welcome to the Ubuntu community =)!. Your question gives an interesting perspective on how a windows user views the new world of linux/unix.

When you install (most) applications, they tend to be installed into /usr/bin (on ubuntu), but that is only the binaries. The data files are installed to various other locations, such as /usr/share/applicationnamehere. Libraries generally go into /usr/lib.

Of course all of this information while useful, will probably still not make it seem any more simple to you. The surprising thing you will soon come to notice, is that Ubuntu automatically places your applications in the appropriate folders for you! If you install a ".deb" (installer package) it puts everything where it has to go. You don't get the option to choose where it goes, because the system already has you covered, unlike windows.

The most simple way for you to get applications to the right places, is simply to use the software center, which from your question I'm guessing you have already started to do. You won't have to worry about a "Program Files or no Program Files" issue, Ubuntu's got you covered :)!

Another thing to note, all you need to do to run an application is to type its command. For example, to run the standard text editor, press alt+f2, and type gedit, then press enter. Voila!

You will find Ubuntu, and desktop linux in general, to be a rather intriguing world to work in.

Solution 2:

The purpose of those directories is more or less documented in the filesystem hierarchy manpage: man hier.

Normally you don't have to care where programs go, as the package management will take care of that, but maybe it is good to know that programs or scripts that you install yourself (meaning: outside the package management, without a .deb) should always go under /usr/local/, /opt/ or in your personal home directory. The difference between the first two is that software under /opt/<programname>/ can bring its own libraries without risking problems with the rest of the system, so it's often used by closed source software that relies on specific library versions. And in any case, never install your own scripts in /bin/ or /usr/bin/, as you risk conflicts with the package management then.