The origin of the UNIX directory structure

Source: Internet
Author: User

Unix (including Linux) beginners, often confused, do not understand the meaning of the directory structure.

For example, there is a subdirectory under the root directory,/bin, for storing binaries. However, the/USR subdirectory also contains/usr/bin, as well as/usr/local/bin, which is also used to store binaries, and some systems even have/opt/bin. What is the difference between them?

For a long time, I have also been puzzled, do not understand why this design. Like most people, I just memorize the differences between directories based on the UNIX File system architecture standard (Filesystem Hierarchy).

Yesterday, I read the short explanation of Rob Landley, which dawned on the fact that the UNIX directory structure was historically created.

In 1969, Ken Thompson and Dennis Ritchie invented Unix on minicomputer PDP-7. In 1971, they upgraded the mainframe to PDP-11.

At the time, they used a storage disk called RK05, with a volume of about 1.5MB.

It wasn't long before the operating system (the root directory) became larger and bigger, and a disk was not fit. As a result, they added a second set of RK05, and stipulated that the first disk specifically put the System program, the second disk dedicated to the user's own program, so mount Directory point named/usr. That is, the root directory "/" is mounted on the first disk, and the "/usr" directory is mounted on the second disk. In addition, the directory structure of the two disks is identical, the first disk directory (/bin,/sbin,/lib,/tmp ... ) appears again in the/usr directory.

Later, the second plate is full, they have to add a third set of RK05, the directory is mounted to the name of home/home, and specify/usr for storing the user's program,/home for storing the user's data.

Since then, this directory structure has continued. As hard disk capacity becomes larger, the meanings of each directory are further clarified.

    • /: Storage System program, which is the UNIX program developed by T/T.
    • /usr: programs developed by UNIX system vendors, such as IBM and HP.
    • /usr/local: Store the user's own installed program.
    • /OPT: In some systems, it is used to store programs developed by third-party vendors, so it is named option, meaning "optional".

The origin of the UNIX directory structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.