LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-22-2002, 07:29 PM   #1
JoeLinux
Member
 
Registered: Dec 2001
Location: Marietta
Distribution: Slackware 8.0
Posts: 95

Rep: Reputation: 15
Unhappy Filesystem Hierarchy Question - You probably get these alot. Sorry :(


Well, I'm sure of the purpose for most of the main directories:

/root
/etc
/boot
/dev
/home
/lib
/proc
/mnt

Ok. Let me try to ask my question.

Some of these directories I don't understand, and I think I know why for most of them. It's probably because I'm always using my Linux machine for single-person use. I'm always alone. No one else logs in. So, if you can help me, pretend in your explanation that I'm in an office, with 30 users that login to the machine daily. I think that would help. The questions:

/bin - these are programs. Why arent the programs from /usr/bin in here? The only explanation I can think of is "the programs in /bin are only meant to be run by someone sitting at the computer being logged into". But, then what is the point of..

/sbin - why is this here? This is only to be used by root right? That kind of conflicts with what I just guessed.

/lib - I get /lib, but, I dont see why /usr/lib isn't part of /lib. Why separate them? I would think it would be easier to keep them together. Less places to add to ld.so.conf

/lost+found - what the hell is this?

/opt - I don't understand this at all really. I install all my programs here with a --prefix=/opt/xxx option, but, isnt /bin or /usr/bin the places programs are supposed to go? Why is /opt here? What is it's purpose?

/tmp - is this an automatic temp file directory like Windows? Or is this just a folder made by an install assuming I want to use a temp directory.

/usr - mostly questions listed below.

/usr/bin - I suppose this is the directory where I would have programs installed for all users to use? As opposed (maybe?) to /bin?

/usr/local - what the hell? Local? I don't understand this at all.

/usr/share - same as above.

/usr/src/linux - why would this be available to all users?

and last but not least..

/var - again..totally lost...

Thanks in advance for reading this far down! Any help you can give me would be great. I'm slowly putting Linux together in my brain, and this is a key step!

Last edited by JoeLinux; 04-22-2002 at 07:32 PM.
 
Old 04-22-2002, 08:12 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
let me clarify one a few ?

/opt - mainly for programs to be installed to..
/lost+found - a directory to put lost and found files after a fsck
/var - mainly for log type files.. things or files that change.
/usr/local - for non-admins..

its too hard to explain all of them out of my head though.. most unix books explain the directory tree... try this site out: http://www.linuxhq.com/guides/SAG/c218.html
 
Old 04-23-2002, 07:18 AM   #3
llama_meme
Member
 
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590

Rep: Reputation: 30
There isn't a very consistent logic behind Linux's directory structure, but I think the following stuff is true(ish)

/bin: is for very basic system utilities (the kind you could assume existed if you were writing a shell script)

/sbin: is like /bin, except for programs root would want to run.

/usr/bin: basic system programs, daemons, etc. Some (e.g. pppd) might be in /usr/sbin.

/usr/local/bin: just for ordinary programs.

The split between /lib, /usr/lib and /usr/local/lib is broadly similar to that between /bin, /usr/bin and /usr/local/bin.

/opt: doesn't exist on all distributions. Mainly used for putting large desktop enviroments in (e.g. GNOME, KDE) so they don't clog up /usr/local

/tmp: a standard part of any UNIX directory tree. Just a place for any application to put temporary files.

/var is just like trickykid said.

/usr/share and /usr/local/share: Hold applications' global configuration files (/etc is more for system configuration files, although XWindows uses it too :S). Generally you could expect a program installed in /usr/bin to use /usr/share and a program installed in /usr/local/bin to use /usr/local/share. The share directories also hold icon pixmaps, etc.

/usr/src/linux: generally big files that don't belong in /var, /etc, /opt or /tmp go in /usr, which is probably why src is in /usr.

As an additional complication, some of the directory structure is a result of traditional UNIX systems having several different partitions in the main directory structure (this is still standard practice in the BSDs). Typically /, /usr, /tmp, /var and /etc were mounted as separate partitions, and since /usr was the biggest partition, a lot of files ended up going in there. This historical stuff is partly responsible for the confusing /bin and /usr/bin split.

Having said all that crap though, it's not really worth worrying about it, especially as different distributions have different layouts anyway.
 
Old 04-23-2002, 07:28 AM   #4
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
Pretty much all of the above. Also look here for an explanation of how a Linux filesystem is "supposed to be".
 
Old 04-23-2002, 09:33 AM   #5
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 45
There are attempts to standardise the Linux file structure, which can be found at the FHS website. http://www.pathname.com/fhs/

You should download the latest release for an explanation of what everybody 'should' be following.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function Level Hierarchy Mistro116@yahoo.com Programming 4 11-27-2005 04:30 PM
#include hierarchy Mistro116@yahoo.com Programming 2 11-27-2005 11:50 AM
Creating a group hierarchy? statuszero Linux - Security 5 07-16-2004 03:18 PM
Desktop hierarchy filesystem: I WANT TO CHANGE IT!! opioid Linux - Software 2 03-28-2004 01:32 AM
NEWBIE here with alot of question... please help... i dont want to go back to XP... The SIN Raven Linux - Software 33 06-06-2003 09:20 AM


All times are GMT -5. The time now is 04:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration