This guide will show you how to turn on or off the sudo command on Windows 11.
You might have used sudo on Linux or Mac computers. It lets you run commands with special permissions, like an administrator. Now, Windows 11 has added this command too, so you can use it just like on other systems.
Starting with
Windows Insider Build 26052 (Canary)
, the sudo command was introduced to make it easier to run commands as an administrator right from the command line.
What Are the Different Ways sudo Can Work?
- In a new window: This opens a new window to run the command with administrator rights.
- With input disabled: The command runs in the same window but doesn’t accept input while running.
- Inline: The command runs in the same window and accepts input, like on Linux or Mac.
Using sudo in Windows makes it easier and faster to do tasks that need administrator permissions without switching users.
How to Enable sudo Using Windows Settings
Follow these simple steps:
- Open the Settings app.
You can do this by:- Clicking the Start button and then Settings, or
- Pressing Windows key + I on your keyboard.
- In Settings, click on System on the left side.
Click on System in Settings - On the right side, find and click For Developers.

Click on For Developers under System - Find the option for Enable sudo and turn the switch to On to enable it.

Turn on Enable sudo and choose your preferred mode - You can also pick how you want
sudoto work by selecting one of the three modes from the dropdown:- In a new window
- With input disabled
- Inline
- To turn off
sudo, just switch the toggle to Off.
How to Enable or Disable sudo Using Windows Terminal (Command Prompt)
You can also turn on or off sudo by typing commands in the Windows Terminal app:
Enable sudo in “In a new window” mode:
sudo config --enable forceNewWindow
Enable sudo in “With input disabled” mode:
sudo config --enable disableInput
Enable sudo in “Inline” mode:
sudo config --enable normal
Disable sudo command:
sudo config --enable disable
Enable or Disable sudo Using Windows Registry Editor
If you are comfortable using the Registry Editor, you can also change sudo settings there.
- Open the Registry Editor.
- Go to this folder path:
ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSudo
- Look for a value named Enabled on the right side. Double-click it to change its number.
- Use these numbers to choose a mode:
1– “In a new window” mode2– “With input disabled” mode3– “Inline” mode0– Disable sudo
- If you don’t see Enabled, right-click on a blank space, choose New → DWORD (32-bit) Value, name it Enabled, and set its value to one of the numbers above.

sudoAfter making changes in Registry, restart your computer for them to take effect.

sudo in Windows TerminalSummary
- Turning on
sudoin Windows 11 helps you run commands as admin easily from the command line. - This makes your work faster and helps keep your computer safer by not needing to log in as an administrator all the time.
For more details, you can visit the official Microsoft blog.





Leave a Reply Cancel reply