Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

Sudo in Windows: What It Is and How to Use It

  • April 23, 2025
  • 6 min read
IT Engineer and Technical Author. Karim is specializing in Linux, he is a prolific blogger who writes for various websites.
IT Engineer and Technical Author. Karim is specializing in Linux, he is a prolific blogger who writes for various websites.

No more “Run as Administrator” – Windows 11 (24H2+) now supports sudo, just like Unix /Linux systems! This means you can execute privileged commands with ease, right from the console. Want to know how to set it up?

Microsoft recently introduced the famous command “sudo” from Unix and Linux-based systems to Windows 11. Before that, Windows users used to rely on alternatives like “Run as Administrator” to perform tasks that required admin privileges.

What is sudo in Windows?

sudo” in Windows enables users to run privileged commands directly without requiring the reopening of a privileged console session. Currently, sudo is only available on Windows 11, version 24H2 and higher. While it’s not supported on Windows 10 right now, Microsoft may eventually add it in a future update.

How to Enable sudo in Windows

You can enable sudo on Windows either via GUI or a privileged console session. Let’s check both methods one after one.

Method 1: Enabling sudo for Windows via GUI

In this method, we are going to utilize Windows GUI to enable sudo.

Step 1: Open System Settings

  • First, hit the start menu icon and open Settings.
  • After that, click on “System” and then on “For developers”.

Settings | System

Step 2: Enable sudo for Windows

Turn on the “Enable sudo” toggle button:

Settings | System | For developers

Method 2: Enabling sudo for Windows via Console

While most Windows users prefer doing their tasks by using GUI, some of them want to via console.

To enable sudo using the console follow the procedure below:

Step 1: Open privileged Console session

As the first step, you need to launch a privileged Windows console session:

Open privileged Console session

Step 2: Enable sudo

Now, execute the mentioned command while providing the configuration option for enabling sudo:

sudo config --enable config_opt

Enable sudo

 

Note: Replace “config_opt” with one of these:

  • normal (Inline)
  • forceNewWindow (In a New Window)
  • disableInput (Input Closed)

Configuring sudo for Windows

The sudo command in Windows comes with three configuration options which can be switched using the command line or system settings.

Settings | System | For developers

 

Command Prompt

Below are the currently available configuration options:

1. In a New Window

It is the default configuration option. Executing the sudo command with this configuration option will open a new privileged console and execute the command there.

2. Input Closed

This option runs the privileged process in the same window and closes the input handle to prevent receiving input from the console.

3. Inline

The configuration option “Inline” executes the process in the same window and also allows it to receive input from the active console.

How do we use sudo in Windows?

If you want to run any command as a privileged one, then simply add “sudo” before it. Here is a simple example to illustrate the process. Suppose you want to create a directory at a protected location via the console. Without “sudo” you will get a response of “Access is denied”:

Below is the result of doing the same process with “sudo”:

Command Prompt

Conclusion

sudo on Windows lets its users execute privileged commands without launching a console session with admin privileges. This update is exclusively available for Windows 11, version 24H2 or newer. However, this command might be introduced in Windows 10 sooner.

To enable sudo on Windows via GUI, go to system settings and turn the “Enable sudo” button on. You can also enable it using a privileged console session. To do so, run this command “sudo config –enable config_opt” and replace “config_opt” with either of these, normal, forceNewWindow, and disableInput.

Hey! Found Karim’s insights useful? Looking for a cost-effective, high-performance, and easy-to-use hyperconverged platform?
Taras Shved
Taras Shved StarWind HCI Appliance Product Manager
Look no further! StarWind HCI Appliance (HCA) is a plug-and-play solution that combines compute, storage, networking, and virtualization software into a single easy-to-use hyperconverged platform. It's designed to significantly trim your IT costs and save valuable time. Interested in learning more? Book your StarWind HCA demo now to see it in action!