Windows 11 version 24H2 introduces Sudo for Windows, a powerful feature that lets users run elevated commands directly from an unelevated console. This guide explains what Sudo is and how to enable or disable it on your system.
What is Sudo?
Sudo (short for superuser do) is a command-line utility widely used in Unix-like operating systems. It allows users to execute commands with elevated privileges without switching to the root account, making administrative tasks more secure and efficient.
What is Sudo for Windows?
Microsoft has adapted this concept for Windows 11. Sudo for Windows enables users to run elevated commands directly from a standard console session. Instead of opening a new elevated console, you can perform administrative tasks seamlessly within your current environment.
How to Enable Sudo for Windows
Follow these steps to enable or disable Sudo in Windows 11:
- Open Settings
Right-click the Start menu and select Settings, or press Windows Key + I.
- Navigate to System
In the Settings menu, click on System.
- Access Developer Options
Select the For Developers tab.
- Toggle Sudo
Locate the Enable Sudo switch and turn it on or off.
Update: starting with Windows 11 version 25H2, Microsoft replaced the old For Developers page in Settings with a new page called Advanced.
Configure Sudo Behavior
Once enabled, you can configure how Sudo runs applications. Three options are available:
- New Window (force New Window): Runs the command in a new elevated console window.
- Disable Input (input closed): Runs the command in the current window without accepting input.
- Inline (normal): Runs the command in the current window and allows input.
Choose the option that best suits your workflow from the drop-down menu.
Example of Using Sudo
After enabling Sudo, you can run elevated commands directly. For instance, to view active network connections along with associated executable names, use:
sudo netstat -ab
This will trigger a User Account Control (UAC) prompt, requiring confirmation before executing the command with elevated privileges.
Sudo for Windows is a valuable addition that simplifies administrative tasks and enhances productivity.
