Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm a newbie Linux (Ubuntu) user and I'll like to know if someone can give some advices of where to install stuff, which folders don't touch, which is the meaning of each folder and so on.

My first concern is, should everything go into my home folder? I've installed "manually" Komodo Edit (it's an IDE) and it has gone to my home folder, I really don't like the idea of having an application there. (in windows I used to have my workfiles/pictures/downloads... partition and then the OS partition with all the apps).

So, is there any place where I could install this software? Any advice for having my home folder ordered? Maybe I should create an apps folder in my home dir?

Thanks in advance. :)

pd: most of the time I use apt to install stuff, but I don't always found the software I want there...

share|improve this question
    
I have seen that there are basically three ways of installing software. First, packages (best one), then selfcontained tarballs (just unzip and run), and finally the "make install" stuff. I've created a Apps folder for the tarballs and for the "make install" apps I'm using "checkinstall" which creates a package so that later is easier to uninstall this apps. Anyway, thanks for the answers. :) –  doup May 2 '10 at 11:06

3 Answers 3

up vote 3 down vote accepted

/home/<yourlogin> is your effective 'My Documents' equivalent to windows. Your desktop is in there, your pictures, etc...

Usually you download things there, and compile/run rpms from that location which then request super-user access (elevation) and will install thier applications to places like:

/usr/bin /usr/lib etc...

  • /bin Contains OS Global Commands, much like PATH on windows
  • /sbin Contains OS Global Commands for Super-Users (requires elevation)
  • /usr/bin Contains Apps
  • /usr/sbin Contains Apps that require elevation
  • /dev Contains Devices (eg: /dev/sda0 is Scsi Drive A, partition 0, /dev/floppy is your floppy drive, etc...
  • /etc is where your system configuration is, usually in .conf files

That's a basic primer i guess.

Also, prefixing a folder with . will make it 'hidden' i.e: /home/aren/.ssh, you can still go to it but you must use ls -a to make it show up in the list when looking.

share|improve this answer
2  
The filesystem stuff is called POSIX. There are many documentations which describe that. Besides that. Usually you install software in 3 flavours. 1) .deb with APT/dpkg 2) source (./configure, make, make install) 3) unzip it. Komodo is most likely the third one. Usually when you would install a software, you have to use the following commands. ./configure --prefix=/usr && make && sudo make install. || HOWEVER. It is NOT recommended. You should just use the PPAs: launchpad.net/ubuntu/+ppas (click on one to get more info. In a nutshell, fresh/other software) –  Shiki Apr 30 '10 at 21:38
    
(More info: PPA is Personal Package Archive in short. Its like having a small space (~1gb) where you can upload your source package, and the servers will create .debs from it. Whats the point ? You can make .deb packages with ease, distribute them , so on. Also, its a piece of cake to add such a PPA to your Ubuntu. Just click on one and use the "More about installation.." blue text.) –  Shiki Apr 30 '10 at 21:39
    

Wikipedia has a great article about this. A quote from the most useful part of that article:

In the FHS all files and directories appear under the root directory "/", even if they are stored on different physical devices. Note however that some of these directories may or may not be present on a Unix system depending on whether certain subsystems, such as the X Window System, are installed.

The majority of these directories exist in all UNIX operating systems and are generally used in much the same way; however, the descriptions here are those used specifically for the FHS, and are not considered authoritative for platforms other than Linux.

  • / Primary hierarchy root and root directory of the entire file system hierarchy.
  • /bin/ Essential command binaries that need to be available in single user mode; for all users, e.g., cat, ls, cp.
  • /boot/ Boot loader files, e.g., kernels, initrd; often a separate partition[8]
  • /dev/ Essential devices, e.g., /dev/null.
  • /etc/ Host-specific system-wide configuration files (the name comes from et cetera[9]).
  • /etc/opt/ Configuration files for /opt/.
  • /etc/X11/ Configuration files for the X Window System, version 11.
  • /etc/sgml/ Configuration files for SGML.
  • /etc/xml/ Configuration files for XML.
  • /home/ Users' home directories, containing saved files, personal settings, etc.; often a separate partition.
  • /lib/ Libraries essential for the binaries in /bin/ and /sbin/.
  • /media/ Mount points for removable media such as CD-ROMs (appeared in FHS-2.3).
  • /mnt/ Temporarily mounted filesystems.
  • /opt/ Optional application software packages[10].
  • /proc/ Virtual filesystem documenting kernel and process status as text files, e.g., uptime, network. In Linux, corresponds to a Procfs mount.
  • /root/ Home directory for the root user.
  • /sbin/ Essential system binaries, e.g., init, ip, mount.
  • /srv/ Site-specific data which is served by the system.
  • /tmp/ Temporary files (see also /var/tmp). Often not preserved between system reboots.
  • /usr/ Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.[11]
  • /usr/bin/ Non-essential command binaries (not needed in single user mode); for all users.
  • /usr/include/ Standard include files.
  • /usr/lib/ Libraries for the binaries in /usr/bin/ and /usr/sbin/.
  • /usr/sbin/ Non-essential system binaries, e.g., daemons for various network-services.
  • /usr/share/ Architecture-independent (shared) data.
  • /usr/src/ Source code, e.g., the kernel source code with its header files.
  • /usr/X11R6/ X Window System, Version 11, Release 6.
  • /usr/local/ Tertiary hierarchy for local data, specific to this host. Typically has further subdirectories, e.g., bin/, lib/, share/.[12]
  • /var/ Variable files—files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail files. Sometimes a separate partition.
  • /var/lib/ State information. Persistent data modified by programs as they run, e.g., databases, packaging system metadata, etc.
  • /var/lock/ Lock files. Files keeping track of resources currently in use.
  • /var/log/ Log files. Various logs.
  • /var/mail/ Users' mailboxes.
  • /var/run/ Information about the running system since last boot, e.g., currently logged-in users and running daemons.
  • /var/spool/ Spool for tasks waiting to be processed, e.g., print queues and unread mail.
  • /var/spool/mail/ Deprecated location for users' mailboxes. /var/tmp/ Temporary files to be preserved between reboots.
  • /var/www/ Website file hierarchies (the default location for websites served by Apache).
share|improve this answer

Under Linux directories in the root folder / are laid out according to the Filesystem Hierarchy Standard. Usually one uses a package manager provided by the distribution to install and uninstall software. There are also several places where configuration files are stored (most notably in /etc/) and sometimes these need to be edited by the user. Otherwise there should be little need to mess around outside of your home directory.

When you install software by hand you usually do not want to install into the system directories like /usr/bin/, /bin/ or /sbin/ or /usr/sbin/. Instead manually installed software should use /usr/local/ instead to avoid clashes with software installed by with the package manager and which effectively has the same structure like / (i.e. for manual install use /usr/local as prefix)

When you install software outside of the usual structure, the shell migh not find the executables and the binaries might not find libraries it was linked against. Binaries are searched for in all directories listed in the shell variable $PATH that you can adjust. The same holds for $LD_LIBRARY_PATH which holds the list of directories to search for libraries when resolving link dependencies (see man ld).

(Note: above contains a lot of "usually" and "customary". This is because nobody forces you to follow some (reasonable) standard -- you are free to shoot yourself in the foot.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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