explaingit

microsoft/sudo

5,831RustAudience · ops devopsComplexity · 1/5Setup · easy

TLDR

A Microsoft-built Windows 11 feature that lets you run commands with administrator permissions from a regular terminal by typing 'sudo' before the command, without opening a separate elevated window.

Mindmap

mindmap
  root((windows-sudo))
    What it does
      Elevate single command
      No new terminal window
      Windows 11 built-in
    How to Enable
      Windows Settings app
      Developer Features section
      Build 26045 or newer
    Components
      sudo.exe core tool
      sudo.ps1 wrapper
    Differences from Linux
      Separate implementation
      Different permission model
      Some features missing
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run a single Windows command with admin rights from your normal terminal without opening a new elevated terminal window.

USE CASE 2

Enable the sudo feature on Windows 11 through the Developer Features settings panel and start using it immediately.

USE CASE 3

Use the included PowerShell wrapper script to make sudo more convenient from a PowerShell terminal.

USE CASE 4

Report bugs or request features for the Windows sudo tool through the GitHub issue tracker.

Tech stack

RustPowerShellWindows

Getting it running

Difficulty · easy Time to first run · 5min

Requires Windows 11 build 26045 or newer, enable in Settings under Developer Features.

License information was not mentioned in the explanation.

In plain English

Sudo for Windows is a tool that lets you run commands with administrator-level permissions directly from a regular, non-elevated terminal window. On most Windows setups, if you need to do something that requires admin rights, you typically have to open a new terminal as an administrator. This tool removes that friction by letting you prefix a command with "sudo" and run it with elevated privileges right where you already are. This is a Microsoft-built feature that shipped as part of Windows 11 starting with build 26045. If you are on a qualifying Windows 11 Insiders build, you can turn it on through the Windows Settings app under the "Developer Features" section. The repository here is where the team tracks bug reports and feature requests from the public. It is worth knowing that despite sharing a name, this is not the same thing as the sudo command found on Linux and Mac. Those are completely separate applications with different designs, different permission models, and different behavior. Scripts or instructions written for Linux sudo will not necessarily work the same way here, and some features from the Linux version are absent, while this Windows version may have features the Linux one does not. The project also includes a PowerShell helper script called sudo.ps1 that wraps the core sudo.exe tool to make it more convenient to use from PowerShell. Contributions to that script are accepted via the normal GitHub pull request process. Full documentation for the tool lives at a separate Microsoft documentation site linked from the repository.

Copy-paste prompts

Prompt 1
How do I enable sudo for Windows on my Windows 11 machine? I am on a recent Insiders build. Walk me through the steps in Settings.
Prompt 2
What is the difference between sudo for Windows and sudo on Linux? I want to know what features behave differently before I rely on it in scripts.
Prompt 3
I want to use the sudo.ps1 PowerShell helper that comes with microsoft/sudo. How do I install it and what does it add over using sudo.exe directly?
Prompt 4
Can I use sudo for Windows in a PowerShell profile to run specific admin commands without a separate elevated window? Show me an example.
Open on GitHub → Explain another repo

← microsoft on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.