How to Use & Configure Sudo in Windows

First, you need to enable Sudo from the Settings app

Reading time icon 2 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

how to use sudo in windows

With the release of Windows 11 Insider Preview Build 26052, Sudo was introduced to Windows 11, and the user with this version and higher can use it to run commands as an administrator. In this guide, we discuss how to enable, configure and use Sudo in Windows.

How can I use Sudo for Windows?

1. Enable Sudo

  1. Press Windows + I to open the Settings app.
  2. Go to System, then For Developers.
  3. Locate the Enable Sudo, and toggle the switch to turn it on.Enable Sudo - use Sudo for Windows
  4. Click Yes to confirm the action.

2. Configure Sudo for Windows

  1. The default configuration option for Sudo for Windows is In a new window, however, you can configure it accordingly as well.
  2. Press Windows + I to open the Settings app.
  3. Go to System, then For Developers.
  4. Locate Enable sudo, then locate Configure how sudo runs applications, and choose from In a new window (forceNewWindow), Input closed (disableInput) or Inline (normal) from the drop-down menu.configure sudo - How to use Sudo for Windows
  5. Alternatively, you can also open elevated command line, and type the following command after replacing <configuration_option> with forceNewWindow, disableInput, or normal, then hit Enter: sudo config --enable <configuration_option>

In case if you are not sure about the configuration optons, make sure you set it as In a new window.

3. Use Sudo on Windows

  1. Press the Windows key, type cmd and click Run as administrator.CMD elevated
  2. Now use sudo before any of the commands you want to use, let us say you want to check the active network connection, you can use the following command: sudo netstat -ab

In conclusion, to use sudo in Windows, you need to first enable, and configure Sudo on your device, then run commands on the elevated mode.

If you are using sudo, you might want to use dual boot Windows 11 and Ubuntu, read this guide to learn the detailed steps. In case you are already using the dual boot but it is not working for you, try repairing it from Windows or check out other methods.

While this command is now natively available, you can use other commands, and we have a great guide on what is rsync in Windows, so don’t miss it if you want to learn more about command line tools.

If you have any questions or suggestions about how to use Sudo in Windows; feel free to mention them in the comments section below.

More about the topics: Sudo, Windows 11

User forum

0 messages