惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
罗磊的独立博客
H
Help Net Security
I
Intezer
G
Google Developers Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Troy Hunt's Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News and Events Feed by Topic
J
Java Code Geeks
S
Security Affairs
T
The Blog of Author Tim Ferriss
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Docker
The GitHub Blog
The GitHub Blog
F
Full Disclosure
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
S
Security @ Cisco Blogs
腾讯CDC
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
T
Threatpost
D
DataBreaches.Net
Recent Announcements
Recent Announcements
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
L
LINUX DO - 最新话题
Google Online Security Blog
Google Online Security Blog
S
Schneier on Security
S
Securelist
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Help Net Security
Help Net Security
P
Proofpoint News Feed
Project Zero
Project Zero
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 叶小钗

Hackaday

Why Not Yserver? It’s Xserver, But Rust-y. OpenCAL: Computed Axial Lithographic 3D Printing For Everyone Is A CS Degree DOA Thanks To LLMs? IEEE Says TBD. Double The VRAM Of An RTX 3070 The Pacemaker Patch Robot Chess But Each Piece Is A Small Robot Bambuddy Says Bye To Bambu Lab Cloud Services Converting A Scanning Electron Microscope Into A TEM Is Surprisingly Easy Custom Watch Is On The Case Patterns Everywhere Behold A 60 Hz Refresh Rate E-ink Monitor GentleOS, A Simple OS For Your Old PC Deeply Optimized MSX Emulation On ESP32-S3 With VGA Output Homebrew Macropad Looks Good The Air Position Indicator For The B-29 Building A 1:150 Scale Toyota ProBox Micro Remote Control Car Adding Weight To A 3D Print With Plaster Of Paris, Cleanly Hackaday Podcast Ep 373: GPS, Danger In Space, And Robby The Robot A Peek Inside The Secret Lagercrantz Suitcase Radio This Week In Security: Microsoft On Microsoft, Register Your Domains, Linux On ARM, And FreeBSD Joins The File Cache Club Glue-in Hinge Design Tries Something Different The Hackaday Communicator Badge, Re-Imagined With New Firmware Amiga 1232 Storm CD Packs Every Upgrade Into One Wedge So Many Analog To Digital Converters Repairing A Pair Of Voodoo 2 GPUs For Some SLI Action AI The Truly Environmentally Friendly Way Evidence For Water Vapor Plumes On Europa Vanishes In Re-Analysis Mechanical Stability For Your Coils 3D Printed Hose Sprayer Sets Phasers To Suds The Merits Of Comment-Driven Development As Counterweight To TDD Building A Desktop Catalytic Cracker Process 4 Billion Pixels Per Second From 16 DIY Cameras For The Best V-Tubing Rig Ever 3D Printing A Miniature CoreXY Printer An Unlikely Host For An 8080 Emulator Using Brand New NiMH Cells After Sitting 12 Years Unused Investigating The S3 Virge’s Reputation As A 3D Decelerator Card Over-Engineering An FDM Spool Holder From Prusa Mk4S Remains As It Turns Out, There’s More Than One Cassette Mechanism Being Made After All Using Windows 11 On An LGA 775 PC With AGP Videocard Hackaday Podcast Episode 372: PopTubers, Shifty Semiconductors, And Shelving Shelf Labels An Ethernet WiFi Router on a Pi Pico 2W This Week In Security: Messing With AI, 7Zip And Notepad++ Vulnerabilities, HTTP2 Bomb, And More Using Electrolysis For More Than Just Generating Hydrogen Vintage Turntable Gets Brain Transplant And Home Assistant Integration Connecting Your Car To Home Assistant Microsoft Claims 20 Second Qubits If You Want To Hack Me, Come In Through The Speaker Ways To Embed Magnets In 3D Prints And Not Ruin Printers An RGB Keyboard For Your Hackaday Communicator Badge The World’s First GPIB Speech Synthesizer, And It’s For A GRiD Compass Ask Hackaday: How Do You Feel About Electronic Shelf Labels? Make Your Ceiling Disappear With ADS-B And Short-Throw Projector Fixing A Nintendo Game Boy Clone That Runs Too Fast Web-Based Control For A CB Radio Distilling Stale Gasoline To Make It Usable Again DIY Ceramic Circuit Boards Surely Count As Solarpunk Texas Instruments Changes The NE5532 And Others Into Incompatible Versions Deltarune’s Tenna Brought To Life Linux Fu: Fake Webcams, GUI Edition Hydraulic Drive For Your Lawn Tractor But Just What Is This ‘Artificial Intelligence’? Game Dodecahedron Runs AArch64 Assembly A Diffraction Grating Makes This Clock Readable Turning An Old 3D Printer Into A Vinyl Cutter For Cheap A High-Vacuum Controller For An Eventual Electron Microscope Does Your Terminal Speak Morse? This One Does From Scrappy Pallet Wood To Fancy Tea Tray The 2026 EMF Badge Arrives, With An Add-On. As Expected, It’s Familiar Linux Fu: Taming Strace STM32 Handheld Has OpenGL And All The Classics Jenny’s Daily Drivers: Microsoft Windows 11 Using A Mirror To 3D Scan Both Sides Of An Object At Once Cookies, Baked The 3D Printer Way Restoring Apple’s Terrible But Awesome IBook Laptop After The Dust Settles: Building Pebble Apps Bilingual E-paper News Feed Helps Brush Up Language Skills On The Wisdom Of Replacing A NiMH Module In A Prius Battery Pack Know Your Food: Cheesemaking Like A Wire Bender, But For Pop Tubes Revisiting Making Your Own Internet Router In 2026 Reverse Engineering A Rock Bottom NES Clone Classically-named Argus Robot Is Terminator Meets Tumbleweed Making a Zippy FDM Printer out of Wood Off-Grid OCR Server Powered By IPhone Hackaday Links: May 31, 2026 A Camera Viewfinder Makes A Great TV 4-bit Relay Logic Counter Begs To Have Its Buttons Pushed Loading Sega Genesis Games Off A Vinyl Record Ebike Display Uses Reflective LCD Modern Graphics Via DisplayLink For Your ISA-Era PC The Final Steps To A Sub-Minute Benchy Poking Around With JTAG On A Guitar Amp Keychain GameCube Controller Made Functional Breaking Enigma With An FPGA, Just Like At Bletchley Park The Uncooperative Mirror Will Not Help You Testing Various Ways To Waterproof FDM Printed Parts Cheap Yellow Display With Boosted PSRAM Turned Snazzy Emulator Station It’s Another Pi Handheld. But It’s A Really Good One Take The Reins Of This Unique Controller Be Your Own Oil Company With Desktop Fischer-Tropsch Process
A Brief History Of Unix Commands On Windows: CoreUtils (Again)
Al Williams · 2026-06-16 · via Hackaday

If you use Windows today and type ls, cat, grep, or awk in a terminal, there is a good chance something useful will happen. That was not always true. For most of the history of personal computing, Unix/Linux and Windows lived on opposite sides of a cultural border. Unix people had pipes, small composable tools, shell scripts, make, sed, awk, grep, tar, and the idea that everything was a file. Windows people had drive letters, backslashes, COMMAND.COM or cmd.exe, and an API that did not care much about what POSIX thought.

Yet there has always been a demand for Unix tools on Windows. Some of it came from programmers who wanted the same build scripts everywhere. Some came from administrators who missed grep and awk. Some came from companies trying to port big Unix applications to NT without rewriting them all. The result is a long, strange history of Unix-on-Windows layers, toolkits, compromises, and almost-but-not-quite compatibility.

Easy?

The simplest version of the problem sounds trivial. How hard can cat be? Open a file, copy bytes to standard output, done. Writing ls is a little more work, but Windows has directory APIs. Common commands like cp, mv, rm, mkdir are not very mysterious. Even pipes are not foreign to Windows. A lot of the everyday Unix command set can be ported as ordinary Win32 console programs with some path handling and enough patience.

But not all of Unix or Linux translates cleanly to Windows. The big issue is fork(). On Unix, a process can clone itself. The child gets a copy of the parent’s address space, open file descriptors, environment, signal state, and so on. Modern kernels make this efficient with copy-on-write memory, but the programming model is old and deeply baked into Unix. Shells use it constantly. Servers use it. Build systems use it. Scripting languages assume it exists, or at least that the surrounding environment behaves as though it does.

Windows process creation is different. Windows has CreateProcess(), which starts a new program. That is a perfectly reasonable model, but it is not fork() (more like fork()+exec()). If you are just launching notepad.exe, no problem. If you are trying to implement a POSIX shell that forks, redirects file descriptors, adjusts the environment, and then starts another program, the mismatch is extreme and you’ll have to do some strange things to fake things out.

One of the early commercial answers was the MKS Toolkit, originally from Mortice Kern Systems. MKS gave Windows users a pile of familiar commands, shells, and development tools. It was not just ls and friends; it included things like ksh, vi, grep, find, awk, make, and many of the utilities needed to move scripts and build procedures between Unix and Windows. The current PTC MKS documentation still describes it in exactly that spirit: Unix shells and hundreds of commands for interoperability with Windows.

MKS was attractive because it treated Windows as Windows. You were not necessarily pretending your machine was a Unix workstation. You were getting a Unix-flavored toolbox that could operate in a Windows environment. For many people, that was enough. You could write scripts, process text, drive builds, and avoid learning three different syntaxes for the same job.

AT&T Returns

A more ambitious attempt came from AT&T Bell Labs: UWIN, a pet project of David Korn of KornShell fame. UWIN stood for Unix for Windows, and that is more or less what it tried to be: a Unix interface layer on top of Windows NT and Windows 95, with libraries, headers, and commands. Korn’s 1997 USENIX paper describes the goal as building an open environment rich enough to serve as both a development and an execution environment, with nearly all of the X/Open Release 4 headers, interfaces, and commands.

UWIN is one of those projects that feels both obvious and heroic. Obvious, because if you have a bunch of Unix software, you want a compatibility layer. Heroic, because every POSIX semantic eventually has to land on some Windows behavior that was designed with different assumptions. File permissions, symbolic links, signals, terminals, process groups, device files, pathnames, and fork() all have edge cases. You can make the common case work and still spend years fighting the uncommon cases.

Cygwin

Then there is Cygwin, probably the most famous of the classic solutions. Cygwin became the go-to answer for people who wanted GNU tools and a fairly complete POSIX environment on Windows. The model is different from simply compiling ls.exe as a native Windows program. Cygwin provides a POSIX compatibility DLL. Programs built for Cygwin call into that layer, and the layer translates Unix expectations into Windows operations.

That is both Cygwin’s strength and its weakness. It is strong because a lot of Unix software can be rebuilt and made to run. The Cygwin project is explicit that it is not a way to run unmodified Linux binaries; you rebuild from source. It is also not a way to magically make ordinary Windows programs understand Unix signals and ptys. But for source-level portability, it has been remarkably useful.

The weak spot, again, is where Unix semantics do not map cleanly. Cygwin’s own documentation calls out fork() as “particularly interesting” because it does not map well onto Win32, making it difficult to implement correctly. Cygwin’s fork() is not copy-on-write in the usual Unix sense; it has to do substantial work to recreate the parent process state in a new Windows process.

There were other branches on the family tree, too. Microsoft had POSIX and Interix efforts, later wrapped into Services for UNIX. MinGW and MSYS gave developers lighter-weight GNU-ish environments aimed at building native Windows programs. Git for Windows brought a useful subset of MSYS2-derived tools to an audience that did not necessarily know or care what MSYS2 was. But the broad pattern remained: either you had native Windows tools that looked like Unix commands, or you had a compatibility layer that tried to preserve Unix behavior more deeply.

WSL

Then Microsoft changed the game with WSL, the Windows Subsystem for Linux. WSL said, in effect: instead of endlessly translating Unix expectations into Windows expectations, let’s run a Linux userland. The first version translated Linux system calls. WSL 2 went further and used a real Linux kernel inside a managed lightweight VM, which improved compatibility at the cost of making the boundary between Windows and Linux more explicit. Microsoft’s own documentation describes WSL as a way to run a GNU/Linux environment, including most command-line tools and applications, directly on Windows without a traditional VM or dual boot. The WSL 1 versus WSL 2 comparison notes that WSL 2 uses the actual Linux kernel in a managed VM for fuller system call compatibility.

This wasn’t a new idea. Things like coLinux and similar “kernels under Windows” had done this with varying degrees of success, but without the ability to fully integrate with Windows. Having it part of the “official” Windows landscape worked better, as you might expect.

The More Things Change…

But now the pendulum has swung again. Microsoft has introduced Coreutils for Windows, a Microsoft-maintained package based on the Rust uutils project. It provides native Windows builds of familiar Unix-style tools, packaged as a single multi-call binary, including coreutils, findutils, and a GNU-compatible grep. Microsoft describes the goal as making movement between Linux, macOS, WSL, containers, and Windows more frictionless, so the same commands, flags, and pipelines work more consistently.

That is not a replacement for WSL, and it is not trying to be Cygwin. It is closer in spirit to the old desire that made MKS attractive: sometimes you are in Windows, you are staying in Windows, and you still want tools that behave the way your fingers expect.

Of course, as we’ve seen, this is hardly a new idea. In fact, it is practically full circle back to the MKS toolkit. The only difference is the official support.

There is a lesson here. Running Unix commands on Windows is not one problem. There are at least three problems masquerading as one. First, there is the user-interface problem: people like the commands and want them available. That is easy enough. Second, there is the scripting problem: people want pipelines, quoting, globbing, exit statuses, and command options to behave consistently. That is harder. Third, there is the operating-system semantics problem: people want Unix programs to run as though Windows were Unix. That’s where there is the most friction.

So, yes, basic utilities are easy. But the Unix command line is not just a bag of executables. It is an ecosystem built around process inheritance, file descriptors, signals, terminals, pipes, path conventions, and fifty years of assumptions. Every attempt to bring Unix tools to Windows has chosen a different place to draw the line.

MKS drew it at commercial interoperability. UWIN tried to give Windows a serious Unix personality. Cygwin built a POSIX world in a DLL. WSL brought in Linux itself. Microsoft’s new Coreutils for Windows brings the everyday commands back into native Windows space. Sometimes things make a full circle.

But it all starts with a user thinking: Why can’t I list files on Windows with ls? We’ve used MKS, Cygwin, coLinux, UWIN, and even WSL. We’ve also thrown hardware at the problem.