File System Folders and there purpose

knightrous

Distinguished
Jan 27, 2006
271
0
18,780
I decided to post this for my own curiosity, but I thought it would be a good thing for other linux users to learn more about.

Now I've been using Ubuntu for over 2 years now, but for a majority of that time, I've just used Ubuntu like an OS, and never really spent much time exploring or learning more about it (Except when I break things).

So I wanted to ask the question(s):

What do the following folders in the file system mean, and what is there task to the OS?

/bin/ - I'm assuming it's were the standard OS binaries go, but I'm only guessing
/dev/ - I would have said development, but this seems to be were all communication happens (hdds, serial, usb etc etc)
/home/ - 127.0.0.1 sweet 127.0.0.1, the place were you store all your stuff, or should?
/initrd/ - I'm not sure about this one... Something Kernal related?
/lib/ - Guessing it's libraries...
/lost+found/ - Seems obvious, but I've never found anything in there...
/media/ - I seem to use this for mounting my external and shared drives in, not sure if it's what I should be doing here though...
/mnt/ - I'm not sure...
/proc/ - Temp place for all processes running?
/sbin/ - Binaries again, but special?
/srv/ - Services?
/sys/ - Oh noes, not system32?! Must be where the viruses hang out :D
/tmp/ - Temporary stuff!
/usr/ - Stuff?
/var/ - Variables? A new pirate word?


Now, I could have googled this, but I thought, with the wealth of information by the knowledgeable people in this Linux section, should be able to compile a decent explanation. So dig out emacs and start compiling!
 

linux_0

Splendid
wiki

/bin/ Essential command binaries that need to be available in single user mode; for all users

/dev/ Essential devices

/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

/mnt/ Temporarily mounted filesystems.

/proc/ Virtual filesystem documenting kernel and process status as text files

/sbin/ Essential system binaries

/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 user data; contains the majority of (multi-)user utilities and applications

/var/ Variable files, such as logs, spool files, and temporary e-mail files.

bash add_lots_of_salt.bash

:)
 

linux_0

Splendid
/lost+found/ is where files recovered by fsck go, if you find files in /lost+found/ your filesystem is in a lot of trouble

/sys/ is a kernel filesystem where the kernel drops its "stuff" read on


wiki

/sys/ Sysfs is a virtual file system provided by Linux 2.6. Sysfs exports information about devices and drivers from the kernel device model to userspace, and is also used for configuration.


Some systems deviate from all this thus bash add_more_salt.bash

GL :)
 

Zorak

Distinguished
Mar 20, 2006
505
0
18,990
Here you go: http://www.pathname.com/fhs/pub/fhs-2.3.html This has an excellent explanation of what each folder in the unix file-tree is supposed to contain. You did get quite a few of them correct, though, so +1 to your observation skills :p Most people have no idea what anything outside of "My Documents" is on windows even though they use it for years and years, so congrats on not being lazy :)

-Zorak
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
Another one you see from time to time: /opt/ where (usually third-party and/or binary-only) additional (read: not part of the install/distro) utilities and applications go. Examples would be office suites, binary-only browsers, etc. This functionality is sometimes shared with /usr/local/, although the latter should really be used for locally-compiled apps, according to many purists. There are usually accompanying directories /etc/opt and /var/opt.
 

Zorak

Distinguished
Mar 20, 2006
505
0
18,990
Nah, Limeys are loved well enough over here, its just that things that bits of your culture that you guys take for granted seem charming/entertaining and/or quirky to us. For example: tea time, cricket, croquet, anything with the word wicket in it, scones, crumpets (i still have no idea what they are), and royalty. Every culture has its quirks, but since the Brits are closest to us culturally (with the possible exception of Canadians) their differences are easiest to poke fun at.

-Zorak

P.S. I'd have been at the Boston Tea party simply because I don't like tea >:)
 

Zorak

Distinguished
Mar 20, 2006
505
0
18,990
I am not entirely sure what you mean by that, but ok. Anyways, for me, I think of a culture as a set of rather arbitrary decisions that have been preserved for no reason other than than tradition (I see all cultures this way), so to me being really into one culture or another doesn't make much sense. I am a really big proponent of personal choices, so to me, it makes more sense to grab whatever features of a culture that you like and adopt them into your own personal lifestyle (in a piecemeal fashion). It is up to each and every person to decide how they wish to live their own life, so picking a set of default choices to dictate how one ought to live seems pretty restrictive to me. One might say that by doing what I do, you'd end up with a hodge-podge of different values (some of which conflict), and I agree that is entirely possible, but it is also up to each person to make sure their own choices remain consistent with themselves, and in trying to reconcile many different (and sometimes conflicting) beliefs, they create something new, which is good. You could also say the extreme case of my suggestion to pick pieces of cultures and incorporate them into your lifestyle would be picking the majority or all of your choices from one particular culture, and while I agree that can be done (and there will be people who will do it), I will probably never understand why someone would choose to live that way.

Anyways, that is how I see it, and with that little blurb, let this thread return back to its topic.

-Zorak