Home » Questions » Computers [ Ask a new question ]

What is the intended purpose of top-level linux/unix directories and what should they contain? [duplicate]

What is the intended purpose of top-level linux/unix directories and what should they contain? [duplicate]

As the title says, what is the intended purpose of top-level linux/unix directories and what should they contain? What is the meaning of their names? e.g. /var /etc /opt /usr

Asked by: Guest | Views: 332
Total answers/comments: 2
Guest [Entry]

"What you're looking for is the Filesystem Hierarchy Standard. Answers to all the questions you ask are covered in the FHS.

With regard to writing applications that conform to any Linux distribution, you may also want to look at the XDG Base Directory Specification. It is more desktop/user oriented."
Guest [Entry]

"There is a standard structure called Filesystems Hierarchy Standard (FHS). Some linux dists adhere to it, some don't.

In simple terms, when it comes to /usr and /var, you can say that /usr are user installed files that don't change and /var are for files that do change(spool, formatted documentation). This is so you can , for example, mount /usr over a network and have several computers that share the ""static"" /usr/ and have a local /var for files that are ""dynamic"".

Quotes from Linux System Administrators Guide:
http://tldpdotorg/LDP/sag/html/dir-tree-overview.html

/usr/lib

Unchanging data files for programs and subsystems, including some site-wide configuration files. The name lib comes from library; originally libraries of programming subroutines were stored in /usr/lib.

/usr/local

The place for locally installed software and other files. Distributions may not install anything in here. It is reserved solely for the use of the local administrator. This way he can be absolutely certain that no updates or upgrades to his distribution will overwrite any extra software he has installed locally.

/var/lib

Files that change while the system is running normally.

You can read more at http://tldpdotorg/LDP/sag/html/dir-tree-overview.html if there are other directories you want to know about."