| InterLinked via plug on 6 Jun 2026 18:42:30 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: [PLUG] Microsoft grafts (most) Linux commands onto Windows |
On 6/6/2026 9:13 PM, Walt Mankowski via plug wrote:
On Sat, Jun 06, 2026 at 08:33:20PM -0400, InterLinked via plug wrote:On 6/5/2026 1:48 PM, Walt Mankowski via plug wrote:On Thu, Jun 04, 2026 at 04:53:25PM -0400, InterLinked via plug wrote:On 6/4/2026 10:07 AM, jeffv via plug wrote:Grep this: Microsoft grafts (most) Linux commands onto Windows https://www.theregister.com/os-platforms/2026/06/03/grep-this-microsoft-grafts-most-linux-commands-onto-windows/5250796 Coreutils serves over 75 Unix commands in Windows and PowerShell command linesUnix commands like grep, gcc, bash, perl, etc. have been available natively on Windows for a quarter-century now, see: https://en.wikipedia.org/wiki/Windows_Services_for_UNIX The UNIX subsystem is built into Windows (well, the more premium editions of it, like Windows 7 Enterprise/Ultimate); the tools themselves have to be separately downloaded, but it's a simple install. I believe most of the GNU utilities are included. Then, you can run tools like grep, sed, etc. from Command Prompt. No emulators, virtualization, etc. is being used: C:\Users\interlinked>grep usage: grep [-abcEFGHhIiLlnoPqRrSsUvwx] [-A num] [-B num [-C[num]] [-e pattern] [-f file] [--binary-files=value] [--context[=num]] [--line-buffered] [pattern] [file ...] Not exactly the same thing, but the extent to which "grep available on Windows in 2026" and even things like WSL have been "revolutionary" have always been overhyped, IMO.I used cygwin on my Windows boxes for a long time. It was fine in that it gave you a Unix-style command line where you could do things like grep files on your Windows filesystem in a familiar way.I wasn't talking about cygwin, which is a 3rd party install. This was/is 100% native Windows stuff.The wikipedia article you linked to says the final release of these tools was way back in 2004.
Not surprising. Most of the actually useful stuff in Windows probably hasn't been touched much in around two decades now, if not longer.
Are they still available?
Yup. In Windows 7 Enterprise/Ultimate, for example, you can Add/Remove Windows features, and enable "Subsystem for UNIX" or whatever it's called there. The lower editions (Professional and Starter) don't include it. The actual utilities are available in an installer from Microsoft here: https://web.archive.org/web/20201015000000*/https://download.microsoft.com/download/6/2/1/6214608E-1A46-43DA-BEF4-B1A575F7CD26/Utilities%20and%20SDK%20for%20Subsystem%20for%20UNIX-based%20Applications_AMD64.exe
I believe XP also supports it and probably Vista too, though I have no experience using it on those.
Why would you want to run them when options like cygwin and WSL2 are available?
Cygwin doesn't give me anything. The very basic stuff, the native UNIX tools on Windows do fine. Anything more and I'm probably SSHing into a Linux server for something I wouldn't want to do on my PC anyways.
WSL2 is only available on Windows 10+, and I run (and will continue to run) Windows 7.
The nice thing about WSL2 is that it feels much more like you're running a proper Linux distribution on a VM on your Windows box. I'm installing normal Ubuntu packages and can run X11 apps. (OK, the only one I ever run is Emacs. I'm sure there are some that don't work.)Yeah, I get that, though I've never wanted to do that myself. I use separate Linux VMs (not running on my PC, but some other server) for most of my development and other *nix tasks. Aside from simple things like grep, I don't find most of the *nix tools actually that useful on Windows myself.We have plenty of Linux boxes we can run jobs on at work. But for desktops work is a Windows shop. Sometimes it's nice to run jobs on your local box instead of the remote one.
I am maybe a bit peculiar in that I prefer to do a lot of things on a remote server, and *not* on my local machine. For example, I never do development on my PC, even when rarely building Windows software; for example, I cross-compile my own fork of FileZilla for Windows (on a throwaway Linux VM, used just for that purpose).
Usually there are different machines set up for different purposes, and if I'm really tinkering, I like to be able to do it somewhere where I can nuke the VM if something goes wrong and start over, and not mess up anything on my local system.
My main home PC is also 16 years old, so I generally try to minimize resource consumption there and "outsource" what I can to other machines. Most of what I do on Linux is software development (for *nix) or running production software of various sorts, certainly not stuff that makes any sense to do on my PC.
Even on my more powerful work laptop, when doing work stuff, I'll usually spin up VMs to do stuff like working on some kind of application or testing something else, rather than doing it locally. Just my preference, though probably being a Windows user, I've just grown accustomed to doing all those things on other *nix systems, but there are advantages to working that way that I like.
The WSL idea has a niche in filling the "middle ground" between basic Windows tools and full-blown Linux, but I usually prefer one of the latter two to such a compromise. It makes sense if you only have your local machine available, but both at home and at work, I have a lot of other compute at my disposal, so I can just do the tasks somewhere better suited for them.
It's connected to OneDrive, for instance, which the Linux boxes aren't.
Yeah, I don't really see that as much of a "plus" - have to use that at work, but not at home.
I do have to use Windows 11 at work, and it's a massive slog (well, it's either that or a Mac, which is even worse). And especially with the dumpster fire Microsoft has turned into, it gets worse every week. I'd be much more productive on a Windows 7 system. Not approved by corporate security though :/
It sounds to me that the nice thing about this announcement isn't that the tools were never available, but rather that people won't need to install them since they'll be installed by default.The UNIX subsystem was built into Windows, though the tools were a separate download from the Microsoft site (now accessible via the Wayback Archive).Plus they'll be officially supported by Microsoft.UNIX subsystem was officially supported too.Fine. but that system is over 20 years old.
So what? Newer isn't always better. Windows itself and a lot of other stuff has taught us that.
This will likely make it easier for Windows admins to start using POSIX tools in Powershell, which sounds like a good thing.I'm not sure how this would make anything easier that the previous methods didn't already accomplish. The fact that this new way only works on Windows 11 alone probably won't make it easier to do *anything*.Well, for one thing, these new POSIX tools will be built for Powershell, which is a very different and much more powerful environment than the Command Prompt.
Agreed, but PowerShell is object-oriented, and most GNU/Unix tools are text-based, which is why PowerShell comes with its own commands, so they're actually useful for Windows operations. Also I mentioned Command Prompt, but since it's just a normal system command like any other, I can call it from PowerShell too. I haven't tried pipelining it to see how that works though.
Presumably they'll be built to interact with other Powershell utilities. I only know a tiny bit of Powershell, but one big difference between it and Unix shells is that pipelines work with objects instead of streams of bytes, which allows them to interact with .NET objects.
Yup, exactly! And if you listen to Jeffrey Snover, the creator of PowerShell, talk about the history of PowerShell, he had this to say about it:
Yeah, so a lot of people take a look at PowerShell and they say, "Oh, it looks very much like UNIX" — and by the way, just so you know, we actually tried to use UNIX. We didn't start off wanting to invent something. We started off saying, "I got to solve a customer problem". So there were some really great tools out there, the UNIX tools. So my first effort was to get those tools available on Windows, but it turned out that didn't work and the reason why is because UNIX is very much a document oriented operating system, which is to say that a lot of the management is done through document or files whereas Windows is an API oriented operating system. Now, both have their advantages, but here's the thing: the management is completely different. So when I got BASH, and AWK, and SED and GREP available on Windows it didn't help that much, why? Then you go and say AWK, AWK doesn't work against the registry, GREP doesn't work against WMI, SED doesn't work against Active Directory. So in UNIX, those tools, those text manipulation tools, are management tools, but on Windows they are just text manipulation tools and there is not much text so it didn't help. So we had to invent our own stuff, and we wanted to invent as little as possible and so we leveraged a lot of the concepts of UNIX, the compositional model, but UNIX (love UNIX, you guys did a great job) but on the other hand it has weaknesses as well.
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug