Windows 11 to bring Linux SUDO to Command Prompt and PowerShell

You may soon be able to run commands and tools using the Linux "sudo" command on Windows 11.

Windows 11 Enable sudo option
Windows 11 Enable sudo option / Image: @thebookisclosed
  • Microsoft is adding an option to enable “sudo” from the “For developers” page in the Settings app of Windows 11.
  • The feature will be available through the Windows Terminal when using Command Prompt, PowerShell, and other command consoles.
  • The command feature is expected to work in the same way as the Linux sudo command, but you will have the option to decide how you want to run apps with the command.

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.

What are your thoughts on the new Linux command coming to Windows 11? Share your thoughts in the comments.

About the author

Mauro Huculak is a Windows expert and the Editor-in-Chief who started Pureinfotech in 2010 as an independent online publication. He is also been a Windows Central contributor for nearly a decade. Mauro has over 12 years of experience writing comprehensive guides and creating professional videos about Windows, software, and related technologies, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me.