
🪟 Microsoft brought sudo to Windows 11 — and it’s now built into the system
Sudo for Windows lets you run elevated commands directly from an unelevated terminal — no need to open a new PowerShell or CMD window as administrator.
⚡ How to enable it:
- Windows 11 build 26045 or later
- Settings → Developer Features → Enable Sudo
🛠️ Operating modes:
forceNewWindow— opens a new elevated window (classic behavior)disableInput— elevates but without interactive inputinline— runs in the same terminal (most similar to Linux sudo)
📝 Important: NOT a port of Linux sudo It’s a native Windows implementation of the same concept. Permissions and the command-line experience are completely different between operating systems.
sudo netstat -ab
sudo New-Item -Path C:\Windows\test.txt💡 Explanation in a nutshell#
On Linux, sudo lets you run a command as a superuser without switching sessions. Windows always required opening a new admin window. Now, with Sudo for Windows, you can run elevated commands directly in your current terminal — a small change with a big impact on the workflow of developers and system administrators.
More information at the link 👇
