The origin of Linux/unix operating system directory structure

Source: Internet
Author: User
Tags root directory

Beginners of Unix (including Linux) are often confused and don't understand what the directory structure means.

For example, there is a subdirectory/bin underneath the root directory that holds the 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's the difference between them?

For a long time, I have been puzzled, I do not understand why this design. Like most people, I just memorize different catalogs according to the UNIX File system architecture standard (filesystem hierarchy Standard).

Yesterday, I read the short explanation of Rob Landley, and it dawned on me that the UNIX directory structure was historically caused.

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

At the time, they used a storage disk called RK05, which was about 1.5MB in size.

It was not long before the operating system (the root directory) became bigger and larger, and a disk was not installed. As a result, they added a second set of RK05, and the first disk dedicated to the system program, the second disk dedicated to the user's own program, so the mount directory point named/usr.

In other words, 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 directory of the first disk (/bin,/sbin,/lib,/tmp ...) Are again appearing in the/usr directory.

Later, the second plate was full, and they had to add a third set of RK05, the Mount directory point named/home, and specified/USR used to store the user's program,/home to store the user's data.

Since then, this directory structure has continued. As the size of the hard disk becomes larger, the meaning of each directory is further clarified.

/: Storage System programs, that is, At&t developed UNIX programs.

/USR: store programs developed by UNIX system vendors, such as IBM and HP.

/usr/local: Store the user's own installed programs.

/OPT: In some systems, it is used to store programs developed by Third-party vendors, so it is named option, meaning "optional".

Related Article

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.