Windows 11 to bring Linux SUDO to Command Prompt and PowerShell

Windows 11 is expected to integrate a “sudo” command on PowerShell and Command Prompt, similar to the command already available in Linux, macOS, and other Unix-based operating systems. The feature was spotted by @thisbookisclosed on X inside the preview builds of Windows 11 available through the Canary Channel.

What is the sudo command?

The sudo (superuser do) command allows users to run programs and tools with the security privileges of another user (the superuser or administrator, by default). It’s a ubiquitous feature in Linux, macOS, and other Unix-based operating systems for managing permissions and executing commands that require elevated privileges.

Linux sudo command
Linux sudo command / Image: Mauro Huculak

Introducing native sudo command support on Windows 11 further shows Microsoft’s ongoing efforts to bridge the gap between Windows and Unix-like operating systems.

How will sudo work on Windows 11?

Although this implementation is still a work in progress, it’s expected that this integration will function similarly to Linux.

Users will be able to invoke the sudo command in the Windows Terminal to execute commands with administrative privileges without the need to switch user accounts, making it easier to manage system configurations and perform secure operations.

For Developers sudo setting
For Developers sudo setting / Image: @thebookisclosed

To enable the option, you have to open Settings > System > For developers and turn on the “Enable sudo” toggle switch. Then, you have to use the “Configure how sudo runs applications” settings to choose the experience. For example:

  • In a new window: When running the sudo command, the terminal will open a new window to run commands with administrative privileges.
  • With input disabled: Since Microsoft hasn’t mentioned any details about this feature, it’s not clear what this option will do.
  • Inline: When running the sudo command, the terminal will allow you to execute administrative tasks within the same window.

Once the feature is enabled, the sudo command should work on Command Prompt and PowerShell.

It’s important to note that the option is still hidden, and it’s not even available for testing at this time.

Why is Microsoft bringing sudo to Windows 11?

The addition of the sudo command to Windows 11 is part of a broader strategy to enhance the operating system’s appeal to developers, network administrators, and power users who rely on Linux tools for their work. By integrating Unix-like commands directly into the operating system, the company aims to eliminate barriers to productivity further and promote a more versatile and robust environment for software development and system administration.

“Sudo” is not the only non-Windows command available in the operating system. For example, in the stable version, you can already use the tar and curl tools. The “tar” tool allows you to extract files and create archives, while the “curl” tool to transfer files between servers.

When will the Linux command be available on Windows 11?

The feature is still a work in progress, but since Microsoft hasn’t shared any official details, it’s unclear when the command will roll out to users.

However, the company is gearing up to release Windows 11 24H2 later in the year, which is said to include a vast of new features and changes, and the sudo command could be one of the features planned for this release. On the other hand, Microsoft is also known to drop features as soon as they’re ready outside new version releases, so it could also be the case that the company may roll out the feature during a regular monthly update.