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

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

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.

Categories: Linux Tags: ,
  1. December 20th, 2006 at 11:12 | #1

    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. December 22nd, 2006 at 23:20 | #2

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

    /usr/share/doc – documentation.

  3. October 27th, 2008 at 21:48 | #3

    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.

  4. DaShadows1846
    April 30th, 2009 at 02:19 | #4

    yea thats cool shit guys. lol 2012 is coming

  5. SilentKiller25
    April 30th, 2009 at 02:20 | #5

    linux is better than any other operating system i have used

  6. PaNdEmIc666
    April 30th, 2009 at 02:21 | #6

    Does anybody know how python works?

  7. guest
    May 22nd, 2009 at 17:18 | #7

    here is the link for python tutorial http://docs.python.org/tutorial/

  8. guest
    October 7th, 2009 at 20:57 | #8

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

    Thanks for the awesome rundown.

  9. francis agyekum
    October 21st, 2009 at 06:44 | #9

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

    • momojombo lec
      November 21st, 2009 at 11:59 | #10

      momojombo boy

  10. mariston
    July 19th, 2010 at 03:00 | #11

    Very informative for beginners.

  11. August 18th, 2010 at 12:25 | #12

    Thanks for the list. i will bookmark it because i am always forgetting.

  12. justadude
    March 21st, 2011 at 12:29 | #13

    @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
    April 1st, 2011 at 04:37 | #14

    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….

  14. October 20th, 2011 at 20:35 | #15

    Finally a full list of all the directories in the root of my Ubuntu .. Thanks!

  1. October 20th, 2007 at 14:55 | #1
  2. March 15th, 2009 at 20:19 | #2