Microsoft Open‑Sources Sudo for Windows – How to Enable and Configure It
Microsoft has released an open‑source Sudo for Windows that lets users run privileged commands from a non‑elevated terminal, and this guide explains how to enable the feature, configure its three modes, and use the command‑line options.
Enable Sudo for Windows
Open Settings → For Developers and toggle the “Enable Sudo” option, or run the command:
sudo config --enable <configuration_option>Configuration Options
forceNewWindow – Opens a new window to run the elevated command. This is the default behavior.
disableInput – Runs the elevated process in the current window but disables its standard input, so commands that require further user interaction will fail.
normal – Mirrors the classic Unix sudo experience: the elevated process runs in the current window with its stdin, stdout, and stderr attached, allowing interactive input and output routing.
Example Usage
With the default configuration, the following runs netstat -ab with elevated privileges: sudo netstat -ab When disableInput is selected, the new process will not accept any user input, which can break tools that prompt for data after elevation.
The normal mode provides the most familiar sudo behavior across operating systems, keeping the process’s I/O streams connected to the original terminal.
Future Work
Microsoft plans to expand documentation in the coming months and to publish more details on the security implications of the “inline” (normal) configuration.
Official blog post:
https://devblogs.microsoft.com/commandline/introducing-sudo-for-windows/GitHub repository:
https://github.com/microsoft/sudoSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Linux Tech Enthusiast
Focused on sharing practical Linux technology content, covering Linux fundamentals, applications, tools, as well as databases, operating systems, network security, and other technical knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
