Jitsumi
Back to the blog

Windows 11 Sudo Is Still a Preview: How Its Three Modes Work

Microsoft’s Windows Sudo can elevate one command, but in March 2024 it was an Insider preview. See how its three modes differ and which trade-offs matter.

Conceptual illustration of a regular command window leading to a separate elevated command window, with an abstract approval shield; not a Windows screenshot.

Need to run one administrator command without reopening your whole terminal as an administrator? Microsoft’s Sudo for Windows lets you prefix a command in an unelevated console with sudo, then approve elevation through User Account Control (UAC).

The important limit is its release state. As of 6 March 2024, Windows Sudo was available in Windows 11 Insider Preview build 26052 for the Canary and Dev channels. It was not a setting in the normal public Windows 11 release. Microsoft described the feature in its Microsoft’s Sudo announcement and the Build 26052 release notes . That makes it worth a look if you already use preview builds, but not a reason by itself to move a dependable everyday PC onto one. Microsoft warned that some popular games might not work correctly or could crash on recent Insider builds.

What Windows Sudo does

Sudo for Windows elevates the command you ask it to run from a regular console session. It does not turn every later command in that shell into an administrator command. Microsoft’s example is sudo netstat -ab: Windows displays a UAC confirmation, then runs the requested process with elevated privileges.

This is Microsoft’s Windows command-line feature, not the sudo command inside a Linux distribution under Windows Subsystem for Linux. The familiar name describes the idea of requesting elevation; Windows Sudo has its own settings and three modes.

The three modes change how the command meets your console

In a new window (forceNewWindow)

This is the default. Windows opens a separate elevated console for the command. Microsoft says the new window uses the same working directory and environment variables as the original console. Choose it when a separate window is fine and you want to keep the original shell unelevated.

Input closed (disableInput)

The elevated process runs in the current window, but its standard input is closed. It cannot accept keyboard input from that console after it starts, so this mode does not fit a command that will ask you questions. It can suit a non-interactive command when you specifically want its output in the current window.

Inline (normal)

The elevated process runs in the current window with standard input, output and error connected to that console. This is the closest of the three modes to the familiar Unix-style terminal flow, and it supports commands that need further input.

Keep the security trade-off beside the convenience

Microsoft’s security explanation calls out an extra security consideration for the two current-console modes. In both Input closed and Inline, the unelevated and elevated Sudo processes communicate through a connection; Microsoft says a medium-integrity process may be able to drive the elevated process. Closing standard input mitigates that risk because the elevated process cannot read user input, but it is still a security trade-off to consider.

A practical choice is to stay with the default In a new window mode unless you have a specific reason to keep an elevated command in the current console. Use Input closed only when the command does not need input. Choose Inline only when the command needs the current console’s input and you have reviewed Microsoft’s security notes. A familiar command name is not a reason to approve a command you did not intend to run.

How to try it on the preview build

On a supported Windows 11 Insider Preview build, open Settings > System > For developers, turn on Sudo, and choose one of the three modes. Start with the default if you are only exploring. For an example, Microsoft documents sudo netstat -ab; read the command and its arguments before accepting the UAC prompt. You can run sudo -h to see the command’s optional parameters.

Build 26052 was released to the Canary and Dev Insider channels. Microsoft cautioned that features in those channels can change, disappear or never ship, and noted that some popular games could fail or crash on these builds. It also said a Sudo setting might appear by mistake in Windows Server Insider Preview, where the feature itself would not be available. If you need a stable main PC, wait for a generally available Windows release instead of installing an Insider build just for this command.

Sources available by 6 March 2024