Tương đương với thư mục bin (Linux) trong Windows là gì?

Mục lục:

Tương đương với thư mục bin (Linux) trong Windows là gì?
Tương đương với thư mục bin (Linux) trong Windows là gì?

Video: Tương đương với thư mục bin (Linux) trong Windows là gì?

Video: Tương đương với thư mục bin (Linux) trong Windows là gì?
Video: Office 2013 | Hướng dẫn cài đặt và kích hoạt Office 2013 miễn phí mới nhất - YouTube 2024, Tháng tư
Anonim
Mặc dù tất cả các hệ điều hành đều có một số điểm chung, nhưng bạn có thể tự hỏi liệu một loại hệ điều hành có một 'tính năng' cụ thể mà một hệ điều hành khác thực hiện hay không. Với ý nghĩ đó, bài đăng Hỏi & Đáp của SuperUser hôm nay có câu trả lời cho câu hỏi của người đọc tò mò.
Mặc dù tất cả các hệ điều hành đều có một số điểm chung, nhưng bạn có thể tự hỏi liệu một loại hệ điều hành có một 'tính năng' cụ thể mà một hệ điều hành khác thực hiện hay không. Với ý nghĩ đó, bài đăng Hỏi & Đáp của SuperUser hôm nay có câu trả lời cho câu hỏi của người đọc tò mò.

Phiên Hỏi & Đáp hôm nay đến với chúng tôi theo lịch sự của SuperUser - một phân khu của Stack Exchange, một nhóm các trang web Hỏi & Đáp do cộng đồng điều hành.

Ảnh lịch sự của BiblioArchives / LibraryArchives (Flickr).

Câu hỏi

Người đọc SuperUser Toby Blunt muốn biết liệu có tương đương với thư mục bin (Linux) trong Windows hay không:

Is there an equivalent for Linux’s bin directory in Windows? If so, how can I access it from the command prompt?

Tương đương với thư mục bin (Linux) trong Windows là gì?

Câu trả lời

Người đóng góp SuperUser CBHacking có câu trả lời cho chúng tôi:

There is actually nothing special about /bin on Unix/Linux at all. It is just the location where executable files and scripts (which are not actually binary files) are placed by convention. It is included in the PATH environment variable by default for all users.

As Ryan says (comments one and two), the WindowsSystem32 directory on Windows is also in PATH for all Windows users (and, even if it is not, the program loader in Windows will search there anyhow).

You can easily create your own equivalent of /bin on Windows. To make it system-wide, place it somewhere like the root of the file system (such as C:in or under an already-restricted location like WindowsSystem32in), and add it to the PATH environment variable for all users.

For a per-user location, create the directory in your own profile (%USERPROFILE%in) and add it to your account’s PATH environment variable. Windows combines environment variables with the same name, so anything in the machine PATH variable is also added to any user’s PATH, but not the other way around.

Of course, you will have to add files, scripts, shortcuts, and symlinks to your /bin directory yourself. Windows installers do not expect such a thing and will not put files there automatically the way that Linux installers usually do.

Đảm bảo đọc qua các câu trả lời thú vị khác cho chuỗi câu hỏi này thông qua liên kết bên dưới!

Có cái gì để thêm vào lời giải thích? Tắt âm thanh trong các ý kiến. Bạn muốn đọc thêm câu trả lời từ những người dùng Stack Exchange có hiểu biết công nghệ khác? Xem toàn bộ chuỗi thảo luận tại đây.

Đề xuất: