Check the build number
Sudo arrived in build 26100. On anything older the command is unknown, and no amount of enabling will bring it back.
[System.Environment]::OSVersion.Version.Build
The built-in sudo of Windows 11 24H2: three modes, one config command, and why your output ends up in the wrong window.
Windows 11 24H2 ships a real **sudo**. Enable it with `sudo config --enable inline`, then prefix any console command to run it elevated in the same window.
Sudo arrived in build 26100. On anything older the command is unknown, and no amount of enabling will bring it back.
[System.Environment]::OSVersion.Version.Build
The switch lives in the developer section. Enabling it adds the console application to the system path for the current user.
Settings > System > For developers > Enable sudo
Inline keeps the output in the current window, forceNewWindow opens a second elevated console, normal asks in place. The config command with no argument prints the active mode.
sudo config --enable inline
The prefix replaces the detour through a new administrator terminal. The UAC prompt still appears once per command, because sudo grants nothing on its own.
sudo netsh advfirewall show allprofiles state
With forceNewWindow the redirection happens in the new window, so the file you named stays empty. Inline writes into the current shell and the redirect lands in the folder you are in.
sudo ipconfig /flushdns > C:\Temp\dns.txt
Sudo elevates console programs. A graphical app started this way can appear without an obvious prompt while still running in your user context, and interactive tools that own the console behave badly in inline mode.
The build is below 26100 or the feature is off. Enable it, then open a fresh terminal so the path is reloaded.
That is the design. Sudo does not cache elevation, unlike the Linux timestamp.
forceNewWindow sends the output to the other console. Switch to inline.
Some tools check the token of the parent process. Start that particular terminal elevated instead.
The same idea, a separate implementation: no sudoers file, no cached timestamp, and UAC remains the gate.
Yes. The executable sits in System32 and works in any console host.
sudo config --disable turns the feature off again. No registry keys are left behind and existing terminals keep working with their current token.
Free · no account needed · tracks your progress