Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-25-2005, 04:05 PM   #1
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Rep: Reputation: 15
Linux general structure

I've been using linux for a while, but still couldn't completely get used to the linux overall structure...

For example, the folder of /etc , /var , /bin , /sbin, /usr
what are they and why is it organized that way?

Sometime I found it's real difficult to find a file within the system... is there an effective way to search files (beside whereis) ?
Old 05-25-2005, 04:20 PM   #2
Senior Member
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
I got a good idea of the organization in the book The Linux Bible. it explains what the directories are for and why in this way.

/etc is the directory where all the configuration files are (ussualy if not set up differently)
/var holds many different variables as the name itself explains. Logs are found here.
/bin holds binary executable files (probably all unix machines do not differ in this directory much. Many same programs will be found here as this is the base command set)
/sbin holds many other binary commands, that you might find or might not find on different machines running UNIX
/usr holds the user installed programs, usually if not set different.

I suggest you start with a book on Linux. It will explain a lot to you.
Old 05-25-2005, 04:21 PM   #3
Senior Member
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
fs layout:
/etc: configuration files
/var: variably sized files, such as logs and ./www/
/bin: programs
/sbin: more programs
/usr: user-space stuff;
/usr/bin is programs
/usr/share/doc is documentation
/usr/local/bin even more programs.
/proc and /sys: system information. Don't mess with it unless you know what you're doing.
/home/(username)/: `My documents'
/home/(username)/bin: you guessed it: programs (*)
(*) well, this is up to the user, but I do it, so everybody else must do the same (by logic *cough* reasoning)

finding files:
try `locate' and `find'. locate is much faster, but it needs to update a database of file names (that is, if you made recent changes to the fs structure, it might produce a wrong result).
find: slower, always correct, more expressive.

non-general-purpose searching: `which'. returns you the path of the program (/foo/bar/baz) matching a `call' to that program ($ bar)
(in other words, typing foo at the prompt will run $(which foo)

Old 05-25-2005, 07:28 PM   #4
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Also the definitive, pedantic reference is the filesystem hierarchy standard. It goes into this in exhausiting detail.
Old 05-26-2005, 05:14 AM   #5
Senior Member
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
That's a great reference, btmiller--thanks a bunch.


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
General question about directory structure.... Lordandmaker Linux - Newbie 7 11-20-2005 02:57 AM
Linux Memory Structure ashley75 Linux - General 5 06-07-2005 02:25 PM
Linux Directory Structure Boffy Linux - General 9 11-01-2004 01:50 PM
Directory structure in linux hero Linux - Newbie 1 09-04-2003 03:55 AM
File structure of Linux TDEE Linux - Software 6 02-26-2003 11:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:35 PM.

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