BOOK THIS SPACE FOR AD
ARTICLE ADMicrosoft introduced 'Sudo for Windows' today, a new Windows 11 feature allowing users to execute commands with elevated privileges from unelevated terminals.
The company is also working on open-sourcing the new tool and recommends Gerardo Grignoli's gsudo as an alternative with more configuration options and a more extensive feature set.
"Sudo for Windows is a new way for users to run elevated commands directly from an unelevated console session," said Windows Product Manager Jordi Adoumie.
"It is an ergonomic and familiar solution for users who want to elevate a command without having to first open a new elevated console."
The new Sudo tool is rolling out to Windows Insiders in the Canary and Dev Channels running Windows 11 Insider Preview Build 26052.
"This project is not a fork of the Linux sudo project, nor is it a port of the Linux sudo project. Instead, Sudo for Windows is a Windows-specific implementation of the sudo concept," Microsoft explains.
"As the two are entirely different applications, you'll find that certain elements of the Linux sudo experience are not present in Sudo for Windows, and vice versa."
Since Linux sudo and Sudo for Windows are different beasts, scripts written for Linux sudo may not work with Sudo for Windows without some (heavy?) modification.
Those who want to enable the sudo command on their system have to go to Settings > For Developers page in the Windows Settings app and toggle the "Enable Sudo" option.
It can be configured to run applications in a new elevated console window, in the same window but with input disabled, or inline (the new elevated process takes input and routes output to the current window).
After elevating a new process using sudo, a UAC dialog will appear to ask the user for confirmation and escalate privileges once confirmed, using the configuration option the user selected.
Microsoft says the setting for enabling sudo may incorrectly show up on Windows Server Insider Preview builds. However, sudo will not be available on Windows Server, and this setting will be disabled in a future Server Insider Preview build.
Sudo for Windows was accidentally revealed by Microsoft two weeks ago, together with some other in-development features, and was first spotted by Albacore while looking into changes added to updated language packs included with a leaked Windows Server 2025 Insider preview build.
"Over the coming months we will be working on expanding documentation for Sudo for Windows and will be sharing more details about the security implications of running sudo in the 'Inline' configuration," Adoumie said.
"Our team is working on open-sourcing Sudo for Windows and we're excited to share more details about our plans in the coming months."