12

I am completely new to Ubuntu and I must say AskUbuntu and you folks are of great help. So now when I have started installing and playing with apps, my question is what is the best place to install/download apps? Like in Windows it usually goes under your C: drive and then you manage it under Program Files. Linux structure is quite different with a different folder hierarchy. I have attached the directory structure of my machine as well. I thought this question would help lot of beginners.

alt text

1
  • this should be a community wiki (admins~)
    – RolandiXor
    Nov 9, 2010 at 2:18

2 Answers 2

14

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.

5
  • Hi Roland, thanks for the descriptive reply. So I have a doubt regarding temp files. As you know whenever we install something in Windows, much of the stuff goes under C:/windows/temp folder, which you can say in nothing but garbage and we often delete it to recover more harddisk space. How do you clear these sort of temp files in Linux?
    – t3ch
    Nov 9, 2010 at 2:20
  • 1
    Linux doesn't keep those kinds of temp files, except for the actually installers (downloaded by software center on installation), but the good news is, these are removed automatically, unless you change the settings.
    – RolandiXor
    Nov 9, 2010 at 2:25
  • wow cool :) ......
    – t3ch
    Nov 9, 2010 at 2:27
  • 4
    One small thing to add... architecture-independent applications (like Python scripts) are supposed to go to their own folder in /usr/share/. (See here.) Nov 9, 2010 at 2:45
  • 2
    Also if you want to install programs manually (without using package manager), you usually install it inside /opt directory (for global install) and in case you just want to app restricted to your user only, you can install them in $HOME/bin
    – LFC_fan
    Nov 9, 2010 at 3:33
6

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.

1

Not the answer you're looking for? Browse other questions tagged .