微軟推出Coreutils for Windows,讓開發者在Windows原生執行常用Linux命令列工具
<div class="field field-name-field-news-column-category field-type-taxonomy-term-reference field-label-hidden"><div class="field-items"><div class="field-item even"><a href="/tags/%E6%96%B0%E8%81%9E">新聞</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p><a href="https://blogs.windows.com/windowsdeveloper/2026/06/02/build-2026-furthering-windows-as-the-trusted-platform-for-development/#:~:text=Announcing%20general%20availability%20of%20Coreutils%20for%20Windows" target="_blank">微軟於Build 2026開發者大會宣布正式推出Coreutils for Windows</a>,讓Windows 11開發者可在命令提示字元(CMD)、PowerShell與Windows終端機(Windows Terminal)中,原生執行多數常用Linux/UNIX風格命令列工具。</p> <p>Coreutils for Windows是由微軟維護的UNIX風格命令列工具套件,目標是降低開發者在Windows、Linux、macOS、WSL與容器環境之間切換時,因工具與操作方式不一致造成的不便與學習成本,讓既有命令、旗標、管線與指令碼可在Windows環境延續使用。</p> <p><a href="https://learn.microsoft.com/en-us/windows/core-utils/overview" target="_blank">根據微軟說明</a>,Coreutils for Windows是以Rust語言開發而成,並以uutils/coreutils專案為基礎,該專案為GNU coreutils的跨平臺重新實作版本,也是部分現代Linux發行版採用的實作基礎。微軟則維護Windows專用版本,將coreutils、findutils(包含find與xargs)以及GNU相容版本的grep整合為單一套件,同時整合原始DOS版sort與find的移植版本,讓依賴/switch風格語法的既有CMD指令碼,也能與UNIX風格命令並存運作。</p> <p>不過,<a href="https://www.infoworld.com/article/4181357/microsoft-makes-linux-developers-feel-more-at-home-in-windows-with-coreutils-release.html" target="_blank">InfoWorld報導</a><a href="https://www.infoworld.com/article/4181357/microsoft-makes-linux-developers-feel-more-at-home-in-windows-with-coreutils-release.html" target="_blank">指出</a>,<a href="https://learn.microsoft.com/en-us/windows/core-utils/commands" target="_blank">微軟目前列出</a>75項Coreutils for Windows支援工具,但並非所有Linux命令都可在Windows環境使用。<a href="https://github.com/microsoft/coreutils#:~:text=Several%20commands%20share%20names%20with%20built%2Dins%20in%20CMD%20and%20PowerShell.%20Whether%20the%20Coreutils%20version%20runs%20depends%20on%20the%20shell%2C%20the%20PATH%20order%2C%20and%20(for%20PowerShell)%20the%20alias%20table." target="_blank">微軟也提醒</a>,實際執行的是哪個版本,仍可能受到shell內建命令、PATH設定順序,以及PowerShell別名機制等因素影響。</p> </div></div></div>