Grep this: Microsoft grafts (most) Linux commands onto Windows

Steve Ballmer’s apprehensions have materialized: Linux has woven itself into the very fabric of Microsoft Windows. During the recent Build developer conference, Microsoft unveiled coreutils, a multi-call binary file crafted in Rust, which seamlessly integrates over 75 Unix commands into the Windows CMD and PowerShell command lines. This includes beloved commands like cat, ls, grep, and head, joining previously added Linux staples such as curl and sudo.

“Grep in full glory is now available for full Windows access,” proclaimed Microsoft CEO Satya Nadella during his keynote. The grep command, which stands for Global Regular Expression Print, allows users to sift through extensive files, making it indispensable for navigating massive log files—a familiar tool for seasoned Linux users.

Behold! Grep on Windows CMD

Microsoft’s rationale for integrating Linux capabilities is to create a standardized command experience across its diverse platforms. This approach ensures that developer scripts function uniformly across containers, PowerShell, Macs, the Windows Subsystem for Linux (WSL), and the traditional DOS-era CMD command line. The Unix philosophy emphasizes small, easily combinable programs, allowing developers to create intricate workflows by chaining commands together, such as using grep in conjunction with cat.

MORE CONTEXT

The introduction of coreutils is particularly beneficial for those transitioning from Linux to Windows. Users will no longer face the inconvenience of recalling that the ls command for listing directory contents is not recognized in Windows, as both ls and dir will now function seamlessly.

No longer will you need to remember that “dir” and not “ls” works on CMD.

However, challenges remain as some Linux commands overlap with existing CMD and PowerShell commands, leading to potential conflicts. Users may need to discern which command takes precedence based on the shell, PATH order, or alias settings in PowerShell. One user remarked that coreutils alleviates the frustration of translating PowerShell syntax for grep, calling it a “huge win” for functionality over the “not invented here” mentality.

Previously, grep could be utilized on Windows via third-party solutions like Cygwin, but coreutils offers the advantage of native speed due to its Rust implementation. Built from the uutils open-source initiative, coreutils aims for memory safety and cross-platform compatibility, benefiting from the permissive MIT open-source license that avoids the complications associated with the GNU GPL.

While coreutils introduces many familiar commands, some, such as dd, remain untouched, with the documentation humorously noting their potential utility in the future. Additionally, commands related to file permissions, which differ between Linux and Windows, require adaptation for effective use in Windows environments.

Coreutils can be easily downloaded and installed via CMD WinGet, with a compact size of approximately 4.6MB. For many, the inclusion of grep alone makes the download worthwhile, as it excels at navigating through cluttered directories.

Bigger fish to fry

In a landscape where Windows once reigned supreme, Linux has transformed from a competitor to a valuable ally for Microsoft. With the rise of AI technologies posing new challenges, Microsoft has shifted its focus, recognizing that the open-source community is no longer its primary concern. Linux has established itself as the dominant operating system on Microsoft’s Azure cloud service, and the recent introduction of Azure Linux has further solidified this relationship.

Nadella’s enthusiasm for grep aligns with its growing role as a tool for AI agents, capable of efficiently locating critical information within vast datasets. At Build, Microsoft showcased a range of features aimed at empowering developers to integrate AI into their applications, reinforcing the message that developers remain at the forefront of innovation.

Among the announcements was the release of OpenClaw, an agent builder that operates within Windows, benefiting from the security framework of the Microsoft ecosystem. This was complemented by the introduction of Microsoft Execution Containers (MXC), which provide a policy layer for enforcing agent containment requirements.

Microsoft also unveiled the new CoPilot for GitHub, expanding its capabilities to offer a comprehensive developer environment, while AutoPilots, a suite of OpenClaw-based agents for Office 365, were introduced to enhance compliance and efficiency. Nadella highlighted the first of these agents, Scout, designed to assist users within Microsoft Teams by accessing their chats, emails, calendars, and contacts.

Additionally, Microsoft presented a variety of in-house AI models that developers can integrate into their applications, reducing reliance on external APIs. These models encompass reasoning, coding, image creation, voice transcription, and speech generation.

Perhaps most ambitiously, Microsoft launched Project Solara, a platform aimed at ambient computing, which envisions a future where AI operates across a network of interconnected devices. This vision echoes Nadella’s earlier remarks about the immense computational power available at the edge, suggesting a paradigm shift in how technology will interact with users in the coming years.

Winsage
Grep this: Microsoft grafts (most) Linux commands onto Windows