coreutils README

The project's README from github.com/microsoft/coreutils. As one markdown file: README.md.

Coreutils for Windows

UNIX-style core utilities for Windows. The same commands and pipelines you use on Linux, macOS, and WSL - natively.

Install · Shell conflicts · Windows caveats · Contributing


A Microsoft-maintained build of uutils/coreutils, findutils, and grep packaged as a single multi-call binary for Windows. The goal is to make moving between Linux, macOS, WSL, containers, and Windows frictionless: the same commands, flags, and pipelines work the same way, so existing scripts carry over without translation.

Each command supports the standard --help flag for full syntax and options.

This project is in preview.


Install

Install Coreutils for Windows with WinGet:

winget install Microsoft.Coreutils

Or grab the latest build from our Release Page.


Creating custom alias

[!WARNING] Using PowerShell aliases will cause binary stream compatibility. Some utilities will not work when piped (e.g. xargs, find, ...)

Shell conflicts

[!NOTE] Any command not mentioned is included in this suite. The following only lists conflicts.

[!NOTE] You can remove additional utilities using coreutils-manager disable <utility name>. See coreutils-manager --help for other management commands.

[!WARNING] PowerShell 7.4 or later is required. PowerShell 7.6 or later is recommended for ~ support.

Several commands share names with built-ins in CMD and PowerShell. Whether the Coreutils version runs depends on the shell, the PATH order, and (for PowerShell) the alias table.

Legend: ✅ ships and works · ⚠️ ships but conflicts with a built-in · 🛑 not shipped

Command CMD PowerShell 7.4+ Notes
cat ✅ ⚠️
cp ✅ ⚠️
date ⚠️ ⚠️
dir 🛑 🛑 Conflicts with the built-in DOS command
echo ⚠️ ⚠️
expand 🛑 🛑 Conflicts with the built-in DOS command
find ✅ ✅ Integrated port of the original DOS command
hostname ✅ ✅ Superset of the Windows built-in
kill 🛑 🛑 Unavailable due to lack of signals on Windows; Implementing a form of SIGTERM/SIGKILL may be possible in the future however
ls ✅ ⚠️
mkdir ⚠️ ⚠️
more 🛑 🛑 Conflicts with the built-in DOS command (consider edit as an alternative)
mv ✅ ⚠️
pwd ✅ ⚠️
rm ✅ ⚠️
rmdir ⚠️ ⚠️
sleep ✅ ⚠️
sort ✅ ⚠️ Integrated port of the original DOS command
tee ✅ ⚠️
timeout 🛑 🛑 Relies on kill's functionality
uptime ✅ ⚠️
whoami 🛑 🛑 Conflicts with the built-in Windows command

Windows caveats

Difference Detail
CRLF line endings Windows text files often use CRLF (\r\n). Most utilities handle this transparently, but byte-oriented behavior can still observe the \r; for example, uniq may treat the final line as different from a preceding duplicate if the input uses CRLF and the final line has no trailing newline.
No /dev/null Use NUL instead, for example find . -name "*.log" > NUL
No POSIX signals Signals such as SIGHUP, SIGPIPE, and SIGUSR aren't available. Ctrl+C (SIGINT) works as expected.
Path separators Both / and \ are accepted. Some utilities produce \-separated output, which can affect downstream piping.
File permissions Windows uses ACLs, not POSIX permission bits. Permission-based predicates (for example find -perm) may behave differently or be unavailable.
Symbolic links Reading existing symbolic links works without elevation. Creating new symbolic links requires Developer Mode (Settings > System > Advanced) or an elevated terminal.

PowerShell Command Parsing

The installer integrates itself with interactive PowerShell sessions via PSReadLine. It ensures that quoted expressions behave somewhat like they do under UNIX shells or CMD: echo *.txt will then print a number of file names, while echo '*.txt' will print "*.txt" literally.

There are two shortcomings, however:

Intentionally dropped

Commands that exist upstream but aren't shipped here because they rely on POSIX-only concepts, would break existing Windows scripts, or simply aren't useful on Windows.


Contributing

Bug reports and pull requests are welcome. See CONTRIBUTING.md for details on the repo layout and how changes flow between this repo and the upstream uutils projects.

coreutils (microsoft/coreutils)

Searching Database…

Что это такое?Сборка uutils/coreutils, findutils и grep, которую поддерживает Microsoft, — привычные Unix-команды (ls, cp, cat, grep, find), упакованные в один нативный мультивызовочный бинарник для Windows.
Это работает внутри WSL или это нативные инструменты для Windows?Полностью нативные инструменты Windows — не нужны ни WSL, ни виртуальная машина, ни Linux-слой. Цель в том, чтобы одни и те же команды, флаги и конвейеры работали одинаково на Linux, macOS, в WSL, контейнерах и Windows.
Нужна ли какая-то определённая версия PowerShell, чтобы всё работало?Требуется PowerShell 7.4 или новее, а 7.6+ рекомендуется ради поддержки ~ (тильды). Сам набор — это один самодостаточный бинарник на Rust, так что больше ничего устанавливать не нужно.
Все ли Unix-команды, которые я знаю, здесь есть?Большинство есть, но некоторые отсутствуют намеренно: kill и timeout недоступны, потому что в Windows нет POSIX-сигналов, а чисто POSIX-утилиты вроде chmod, chown, chroot, dd и uname убрали как бесполезные или ломающие скрипты на Windows.
Конфликтуют ли имена команд со встроенными командами CMD или PowerShell?Да. Несколько команд совпадают по именам со встроенными (echo, mkdir, sort, ls...), и то, какая версия сработает, зависит от оболочки, порядка в PATH и таблицы алиасов PowerShell. Жёсткие конфликты вроде dir, more и whoami вообще не входят в поставку.
Какие особенности Windows стоит иметь в виду?Текстовые файлы используют CRLF, на чём могут споткнуться побайтовые утилиты вроде uniq; нет /dev/null (вместо него используйте NUL), нет POSIX-сигналов, хотя Ctrl+C работает, а для создания новых символических ссылок нужен режим разработчика или терминал с правами администратора.
Могу ли я сделать алиас ll для ls -la?Да: в PowerShell используйте Set-Alias ll 'ls' или функцию в $PROFILE, если нужны аргументы; в CMD — doskey. Учтите, что алиасы PowerShell ломают бинарные потоки, поэтому конвейерные утилиты вроде xargs и find могут не работать.
Проект готов к ежедневному использованию или пока экспериментальный?Проект официально находится в статусе preview, так что будьте готовы к шероховатостям — но его поддерживает Microsoft на базе апстрим-проектов uutils, и у каждой команды есть стандартный флаг --help.
Creator
microsoft
Size
0.1 MB
Stars
5.3K
Age
5mo
Commits · 90 Days