Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The origin of Unix directory structure

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Author: Ruan Yifeng

Date: February 6, 2012

Beginners of Unix (including Linux) are often confused about what the directory structure means.

For example, there is a subdirectory / bin under the root directory that holds binaries. However, there is also / usr/bin under the / usr subdirectory, as well as / usr/local/bin, which is also used to hold binary programs; some systems even have / opt/bin. What's the difference between them?

For a long time, I also feel very confused, do not understand why this design. Like most people, I just memorize the differences between different directories according to the Unix File system structure Standard (Filesystem Hierarchy Standard).

Yesterday, I read a brief explanation of Rob Landley, and it suddenly dawned on me that the Unix directory structure is caused by history.

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

At that time, they used a storage disk called RK05, which had a capacity of about 1.5MB.

Before long, the operating system (root directory) became so large that a single disk could no longer fit. So, they added the second RK05, and stipulated that the first disk was dedicated to the system program, and the second disk was dedicated to the user's own program, so the mounted directory point was 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 exactly the same, and the directories of the first disk (/ bin, / sbin, / lib, / tmp...) reappear under the / usr directory.

Later, the second disk was full, so they had to add a third RK05, which was mounted with a directory named / home, and stipulated that / usr was used to store the user's program, and / home was used to store the user's data.

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

/: store system programs, that is, Unix programs developed by At&t.

/ usr: stores programs developed by Unix system vendors such as IBM and HP.

/ usr/local: stores the programs installed by the user.

/ opt: in some systems, it is used to store programs developed by third-party vendors, so it is named option, which means "optional".

(end)

Copyright notice of document Information: free reprint-non-commercial-non-derivative-keep signature | Creative Commons BY-NC-ND 3.0original URL: http://www.ruanyifeng.com/blog/2012/02/a_history_of_unix_directory_structure.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report