雖然所有作業系統都有一些共同點,但您可能會發現自己在想,一種作業系統是否有另一種作業系統所具有的特定“功能”。有鑑於此,今天的超級使用者問答帖子回答了一位好奇的讀者的問題。
今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。
圖片由BiblioArchives/LibraryArchives(Flickr)提供。
超級使用者讀者Toby Blunt想知道Windows中是否有(Linux)bin目錄的等效目錄:
Is there an equivalent for Linux’s bin directory in Windows? If so, how can I access it from the command prompt?
什麼是Windows中(Linux)bin目錄的等價物?
超級使用者駭客幫我們找到了答案:
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 \Windows\System32 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:\bin or under an already-restricted location like \Windows\System32\bin), and add it to the PATH environment variable for all users.
For a per-user location, create the directory in your own profile (%USERPROFILE%\bin) 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.
請務必透過下面的連結閱讀此問題線索的其他有趣答案!
有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。
...賓語也可以是補語的一部分。 目錄 1. 概述和主要區別 2. 什麼是物件 3. 什麼是補碼 4. 賓語與補語的關係 5. 並列比較-表格形式的物件與補足 6. 摘要 什麼是一個物體(an object)? 賓語是動詞後面的名詞或名詞短語。它通常指動詞所...
... 既然您已經知道了shell指令碼是什麼以及它們的許多優點,您不想在任務中使用它們嗎?您在使用它們時遇到了哪些問題?請在下面的評論中告訴我們。 ...
... 下面是一些漂亮的例子,說明任務排程器可以做什麼,以及Windows10中新的任務排程器功能。 ...
...供與每個條目相關聯的數值。很明顯,你不知道這個值是什麼意思。因此,要以可讀的方式列出檔案及其大小,請在命令中使用-lh標誌。 ...
...Mac系統管理員通常都熟悉透過終端編寫指令碼,但即使是Windows使用者也可以使用Windows子系統for Linux來進行操作。 ...
受限的shell限制了使用者帳戶在Linux上可以做什麼。受限使用者不能更改其目錄,您可以控制他們可以訪問哪些命令。下面介紹如何在Linux上設定受限shell。 受限炮彈 受限shell不是另一個shell。這是標準外殼的另一種模式。Bash...