Windows admin tasks have always been a chore
Ask anyone who juggles both Linux and Windows daily, and they’ll tell you the same thing: running something as administrator on Windows is needlessly awkward. You either hunt for the right-click menu, pick “Run as administrator,” or keep a separate elevated Command Prompt window open at all times. It works, but it’s clunky.
Linux users have had it better for decades. A simple sudo prefix in front of any command grants temporary elevated rights, right there in the same terminal. No extra windows, no context menus. Just type, hit Enter, and move on.
Windows 11 finally closed that gap with a native Windows sudo command. And here’s the kicker — most people still don’t know it exists.
What exactly is sudo on Windows?
Microsoft introduced sudo for Windows 11 in 2024, starting with Insider builds and rolling out to stable versions since. It works almost exactly like its Linux counterpart: prefix any command with sudo, and it runs with administrator privileges.
No separate elevated window. No right-click gymnastics. You type sudo net start some-service or sudo del stubborn-file.txt and it just works. For anyone tired of the old dance, this is a genuine quality-of-life upgrade.
There are a few differences, of course. Windows sudo can run in three modes, and you’ll want to pick the right one before you start relying on it.
The three sudo execution modes
- Force new window — runs the command in a fresh elevated window. Simple, but you lose the current context.
- Input closed — runs elevated in the same window but closes the input stream, so you can’t type further commands until it finishes.
- Inline — the closest to Linux. Runs the command elevated right in your current terminal, allowing subsequent commands in the same session. This is the one you want.
Without picking inline mode, you’re not getting the full benefit. Head to Settings → System → For developers, find the sudo section, and switch it to “Inline.” That single change makes the feature feel native.
Why you should bother enabling it
If you’re a developer, a power user, or anyone who spends time in the Windows terminal, the Windows sudo command saves real time. Instead of opening an admin PowerShell instance every time you need to tweak a service or edit a protected file, you just prepend sudo.
It also reduces the chances of running a command in the wrong window. With the old workflow, you’d sometimes type a command into a non-elevated prompt, get an access denied error, and have to restart the whole process. With sudo, you know exactly what you’re getting.
For those who already use Windows Terminal tips and tricks, adding sudo to your muscle memory is a natural next step. It pairs especially well with tools like PowerShell automation scripts.
How to enable sudo on Windows 11
Enabling it takes less than a minute. Here’s the quick path:
- Open Settings (Win + I).
- Go to System → For developers.
- Toggle “Enable sudo”.
- Under “How sudo runs commands,” choose Inline.
That’s it. Once enabled, open any terminal — Command Prompt, PowerShell, or Windows Terminal — and try sudo whoami. You’ll see the elevation prompt, and the command runs with admin rights.
If you’re using an older Windows 11 build and don’t see the option, make sure you’ve installed the latest updates. The feature hit stable versions in late 2024, so most current systems should have it.
Is sudo on Windows as good as Linux’s?
Not quite. Linux sudo is deeply integrated, with per-user permissions, session caching, and a rich ecosystem of configuration. Windows sudo is simpler — it just elevates the current command, with no fine-grained control.
But for everyday use, it’s close enough. The syntax is identical, the behavior is predictable, and it removes the biggest friction point in Windows admin work.
If you’re coming from Linux and miss the old workflow, or if you’re a Windows loyalist who never understood why people complained, give it a try. You’ll wonder why it took Microsoft this long.
For more on getting the most out of your system, check out Windows 11 hidden features you might have missed.