• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

Sign in to follow this  

Guide to Linux Directory Structure

Recommended Posts

Keldyn    1

The below guide has been taken from IeXbeta and was compiled by member vboyz103

I thought some of you may find it useful. It does make for a good read.

====================================================

Linux sees things as files and folders, for instance, your floppy drive is seen under Linux as /mnt/floppy, or CD-ROM drive as /mnt/cdrom and etc.

So this is the the overall Linux system architecture.

/

This directory is the ROOT of Linux where everything goes under here.

/usr/bin

This is where all the clients executables like GNOME desktop or KDE.

/usr/sbin

System-wise executables such as hdparm etc.

/usr/local

This is a default location for all 3rd party software installation.

/usr/src/linux-x.x (where x.x is the kernel version)

This is where you go if you want to compile Linux Kernel.

/etc

This directory contains all the CONFIGURATION files for daemons, software etc.

/var

This is a place to store logs for softwares, system logs, and cache for daemon such as squid.

/root

This is a home for user root.

/opt

Often is used for install third party software which Oracle, StarOffice, OpenOffice etc.

/tmp

This is like a C:\Windows\Temp directory in windows.

/boot

Contains all the boot images for Linux.

/home

This is where all the users account info are stored, disk quota can be set here.

/lib or /usr/lib

Are system/software library directories.

/proc

This is VITAL directory for Linux, because it contains all the info. to your hardware from CPU info, to VIDEO Card, BIOS, Hard disks, RAM, etc.

/sbin

This is usually where all the executables for daemon/servers such as DHCP, etc.

=======================================================

If you guys can supply any useful additions please feel free to add here.

Share this post


Link to post
Share on other sites
MulletRobZ    2

I think you're a bit confused, Keldyn:

/boot - contains information for the LILO or Grub interface and MBR information.

/etc - contains the configuration files for various programs.

/usr/src - contains the kernel source and configurations

/usr/bin - contains the links to execute the software.

/usr/lib, /usr/local or /usr/share - contains the libraries needed to run the software.

/root - the home directory for the root user.

/home/(user name) - the home directory for all the other users.

/var - contains the logs generated through the various actions done in Linux

/dev - contains the information for all of your devices

/mnt - links to any external partitions, CD-ROM's, DVD-ROM's, Zip drives, and Floppy drives.

Share this post


Link to post
Share on other sites
mezz    0
I think you're a bit confused, Keldyn:

He doesn't write this. I think, you are confusing too.

http://www.pathname.com/fhs/

http://www.gsp.com/cgi-bin/man.cgi?section...on=7&topic=hier

Well, honestly it's people's personal prefer. I personal rather to follow strict FreeBSD's hier(7) and FHS is near same.

/usr/lib, /usr/local or /usr/share - contains the libraries needed to run the software.

/usr/local isn't libraries, which it's "another" /usr to keep the system to be seprate from other stuff what SysAdmin install. To avoid the conflict, confuse and make more easier life.

Came with system base:

/usr/bin/

/usr/lib/

goes on..

SysAdmin install non-X:

/usr/local/bin/ <-- this is execute stuff

/usr/local/lib/ <-- this is libraries..

goes on..

SysAdmin install X:

/usr/X11R6/bin/ <-- this is execute stuff

/usr/X11R6/lib/ <-- this is libraries..

goes on..

Some people prefer: (I hate this..)

/opt/bin/ <-- this is execute stuff

/opt/lib/ <-- this is libraries..

goes on..

Note: As you can see, it's easier to keep system seprate from what SysAdmin has installed. Also, I like to keep stuff under /usr, because it's easier to setup the size of slice partition rather than create many slice like /opt or whatever.

Anyway, the two links above provide the better explains and etc.

Share this post


Link to post
Share on other sites
Keldyn    1
I think you're a bit confused, Keldyn:

I think you should read it again...

I clearly stated i did not write it. There is nothing wrong with the guide, it is more a matter of personal preference as mezz has pointed out already. There are many ways to do this. What i have provided is just one example. It is over simplified i understand, but that is what makes it so perfect for people who are new to linux.

Share this post


Link to post
Share on other sites
wickedlester    4

I don't know if this fits here. well, I guess it does. But I wanted to also suggest for new linux users, after fresh install is choose your main home working directory and set up some kind of folder structure there also. What I mean is somewhere to keep all your downloaded files, themes, documents, etc, etc. Because your /home directory can end up very cluttered if not, especially if you have your filebrowser set to show hidden files and folders. I usually just set up Documents as my main folder(like C:\ in windows) and then sub-folders beneath such as "wallpaper" "themes""saved_documents" etc. you get my drift anyway.

Just a suggestion because alot of programs create folders just under home and along with your folders it can get cluttered quick.

Share this post


Link to post
Share on other sites
mezz    0
What I mean is somewhere to keep all your downloaded files, themes, documents, etc, etc. Because your /home directory can end up very cluttered if not, especially if you have your filebrowser set to show hidden files and folders.

True.. What do I do with the home directory? I usually do /home -> /usr/home..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.