Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux directory structure - newbie needing advice 4

Status
Not open for further replies.

james00harper

Programmer
May 24, 2002
4
GB
I have just installed linux redhat 7.2 for the first time and I am having trouble understanding its directory/file structure. Does anyone know of any websites/books that can help.
 
Standard Unix base directory stuctures look like this:

/ (root directory -- there is only one root directory for the whole system, regardless of how many physical disks you have)

/bin (base system binaries -- the most standardized stuff that will go with any system)

/boot (self-explanatory, the system boot stuff goes in here)

/dev (device descriptors -- these are files that bsically tell Unix how to map devices, such as keyboard, modem, etc..., including virtual devices)

/etc (this is where most of the global configuration files and initialization scripts go -- see also /usr/local/etc)

/home (or sometimes /usr/home -- this is where individual users other than 'root' log in. Each user has his/her own directory inside /home)

/mnt (info on mounted disk volumes, CDROMs, tape drives, etc...)

/proc (like /dev, but this is contains descriptors for current running processes in the system)

/root (the root user's home directory)

/sbin (standard system binaries, but only normally available to the root user)

/tmp (temporary files can be written here by a variety of applications. This is usually flushed upon reboot, or at regular intervals)

/usr (most specific applications for user interaction are installed inside /usr, so there is a /usr/bin, for example for binaries. Also /usr/local has many specific 'userland' applications installed)

/var (a place for global logfiles, printing spool data, etc...)


There are many variations to the above list, but most Unix/Linux systems emulate this to some degree. Also, remember that for Unix, the filesystem (directories) are completely independent of the physical disks in the system. Thus, for example /home could be on one physical disk or partition, while /home/james could be mounted on another disk. Unix provides for full logical independence of the directory structure from the physical disks (unlike Windows, with it's laughable C:, D:, etc...). This means it is very easy to add a new disk to take over for certain directories that are getting too full.

Hope this helps. For more background, spend some time at
P.S. And finally, a neat tip, if you arent' already familiar with it: if you are using the BASH command prompt to enter commands, you can use what is called "auto-completion". Start typing a directory or command, and hit the tab key. It will fill out to the closest match on the existing filesystem, then if you type a little more, and hit TAB, it will fill out to the next closest match. -------------------------------------------

"Now, this might cause some discomfort..."
(
 
Try these books:
Linux Instalation & Configuration by Matt Welsh

Linux Configuration & Instalation by Patrick Volkerdin, Kevin Reichard, and Eric Foster-Johnson

LINUX SYSTEM ADMINISTRATION HANDBOOK by Mark F. Komarinsky, Cary Collet

LINUX SYSTEM ADMINISTRATION by Anne H. Carasik

Also, these may be out of print, so you may want to check the Linux Documantation Project, or one of the mirrors listed there for HOW-TO's, Guides, and FAQ's about system administaration.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top