Explanation of the Ubuntu / Linux file structure : Ubuntu (all versions)

By | 2006/12/20

In the Linux file system everything is considered a file–even devices, drives and removable media. It definitely is a bit different than what you might be used to in the Windows world, but after a quick rundown (below) hopefully the organization will make some more sense.

The base (or equivalent of C:\) is called the root folder or “/”. The closest equivalent of “Documents and Settings\User” would be “/home”. The “/home” folder stores each users files, settings, pictures, etc. Most of what you do is held within the /home folder. Below is a quick explanation of the rest:

  • /bin – binary applications (most of your executable files)
  • /boot – files required to boot (such as the kernel, etc)
  • /dev – your devices (everything from drives to displays)
  • /etc – just about every configuration file for your system
  • /home – locally stored user files and folders
  • /lib – system libraries (similar to Program Files)
  • /lost+found – lost and found for lost files
  • /media – mounted (or loaded) devices such as cdroms, digital cameras, etc.
  • /mnt – mounted file systems
  • /opt – location for “optionally” installed programs
  • /proc – dynamic directory including information about and listing of processes
  • /root – “home” folder for the root user
  • /sbin – system-only binaries (see /bin)
  • /sys – contains information about the system
  • /tmp – temporary files
  • /usr – applications mainly for regular users
  • /var – mainly logs, databases, etc.

I hope this helps. Again, for the most part as a regular user you wont need to bother with the rest of the areas of the system. Occasionally you might need to edit a configuration file in /etc (as you may have seen in earlier posts), but the rest pretty much takes care of itself.

17 thoughts on “Explanation of the Ubuntu / Linux file structure : Ubuntu (all versions)

  1. Laptop Backpacks

    Thanks, this was really helpful. When I made the switch I had a hard time understanding why I couldn’t just “run” an installer. It was because it was a file. Once you understand a few of the basic principles (like the file structure) the jump to Linus all of the sudden seems a lot easier.

  2. Onno Zweers

    /usr/local/bin – the place to put your own programs. They will not be overwritten with upgrades.

    /usr/share/doc – documentation.

  3. Pingback: L’ours à la campagne » Structure des dossiers sous Linux

  4. Aruna

    Hi guys,
    I want create partions for each director.I know that 100Mb more than enough to /boot directory. Anyone has idea about how much space distribute for each directory in the file hierarchy.

  5. Pingback: Ubuntu Newbie Guide: First 24 Hours With Ubuntu | WebChicklet | Just a Geek Girl

  6. DaShadows1846

    yea thats cool shit guys. lol 2012 is coming

  7. SilentKiller25

    linux is better than any other operating system i have used

  8. PaNdEmIc666

    Does anybody know how python works?

  9. guest

    What filesystem is linux in? FAT/FAT32/NTFS/etc etc
    ?

    Thanks for the awesome rundown.

  10. francis agyekum

    i will be very gratful if you can help me understand the file struture, of debian in linux

  11. mariston

    Very informative for beginners.

  12. justadude

    @guest

    @guest
    Linux likes an ext4 file system. However, an NTFS partition works well for media, as it can be read by other devices externally and more universally than FAT32. Additionally, FAT32 has a 4gb file size maximum which is not the case with NTFS.

  13. Michael Sackey

    i just install ubuntu and dont have permission to the root fold… i have installed apache2 and need to write and copy files in the www folder but i cant access it….

Comments are closed.