System Enable or Disable Sudo Command in Windows 11


  • Staff
Sudo_banner.png

This tutorial will show you how to enable or disable the Sudo command for all users in Windows 11.

Starting with Windows 11 build 26052 (Canary and Dev), Sudo for Windows provides a new way for users to run elevated commands directly from an unelevated console session. It is an ergonomic and familiar solution for users who want to elevate a command without having to first open a new elevated console.

References:

You must be signed in as an administrator to enable or disable the Sudo command.



Contents



EXAMPLE: Sudo for Windows





Option One

Enable or Disable Sudo Command in Settings


1 Open Settings (Win+I).

2 Click/tap on System on the left side, and click/tap on For developers on the right side. (see screenshot below)


sudo_command-1.png

3 Do step 4 (enable/configure) or step 5 (disable) below for what you want.

4 Enable or Configure Sudo Command

A) Turn On Enable sudo. (see screenshot below)​

sudo_command-3.png

B) Click/tap on Yes to confirm. (see screenshot below)​

sudo_command-4.png

C) Select In a new window (default), With input disabled, or Inline for what you want in the Configure how sudo runs applications drop menu. (see screenshot below)​

sudo_command-5.png

D) Go to step 6.​

5 Disable Sudo Command

This is the default setting.


A) Turn Off Enable sudo, and go to step 6. (see screenshot below)​

sudo_command-2.png

6 You can now close Settings if you like.




Option Two

Enable or Disable Sudo Command using Command


1 Open Windows Terminal (Admin), and select either Windows PowerShell or Command Prompt.

2 Copy and paste the command below you want to use into Windows Terminal (Admin), and press Enter.

Enable Sudo command and run apps "In a new window"
sudo config --enable forceNewWindow

OR

Enable Sudo command and run apps "With input disabled"
sudo config --enable disableInput

OR

Enable Sudo command and run apps "Inline"
sudo config --enable normal

OR

Disable Sudo command (default)
sudo config --enable disable




Option Three

Enable or Disable Sudo Command using REG file


1 Do step 2 (enable - new window), step 3 (enable - input disabled), step 4 (enable - inline), or step 5 (disable) below for what you want.


 2. Enable Sudo command and run apps "In a new window"

A) Click/tap on the Download button below to download the file below, and go to step 6 below.​

Enable_sudo_in_a_new_window.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sudo]
"Enabled"=dword:00000001


 3. Enable Sudo command and run apps "With input disabled"

A) Click/tap on the Download button below to download the file below, and go to step 6 below.​

Enable_sudo_with_input_disabled.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sudo]
"Enabled"=dword:00000002


 4. Enable Sudo command and run apps "Inline"

A) Click/tap on the Download button below to download the file below, and go to step 6 below.​

Enable_sudo_inline.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sudo]
"Enabled"=dword:00000003


 5. Disable Sudo command

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 6 below.​

Disable_sudo.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sudo]
"Enabled"=dword:00000000

6 Save the REG file to your desktop.

7 Double click/tap on the downloaded REG file to merge it.

8 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

9 You can now delete the downloaded REG file if you like.


That's it,
Shawn Brink
 

Attachments

  • Sudo.png
    Sudo.png
    11.7 KB · Views: 4
  • Disable_sudo.reg
    584 bytes · Views: 15
  • Enable_sudo_in_a_new_window.reg
    584 bytes · Views: 29
  • Enable_sudo_inline.reg
    584 bytes · Views: 5
  • Enable_sudo_with_input_disabled.reg
    584 bytes · Views: 17
Last edited:
lol
sudo su anyone :lmao:
 

My Computer

System One

  • OS
    Win-7-10-11Pro's
    Computer type
    PC/Desktop
    Manufacturer/Model
    Acer 17" Nitro 7840sn/ 2x16gb 5600c40/ 4060/ stock 1tb-os/ 4tb sn850x
    CPU
    10900k & 9940x & 5930k
    Motherboard
    z490-Apex & x299-Apex & x99-Sabertooth
    Memory
    Trident-Z Royal 4000c16 2x16gb & Trident-Z 3600c16 4x8gb & 3200c14 4x8gb
    Graphics Card(s)
    Titan Xp & 1080ti FTW3 & evga 980ti gaming
    Sound Card
    Onboard Realtek x3
    Monitor(s) Displays
    1-AOC G2460PG 24"G-Sync 144Hz/ 2nd 1-ASUS VG248QE 24"/ 3rd LG 43" series
    Screen Resolution
    1920-1080 not sure what the t.v is besides 43" class scales from 1920-1080 perfectly
    Hard Drives
    2-WD-sn850x 4tb/ 970evo+500gb/ 980 pro 2tb.
    PSU
    1000p2 & 1200p2 & 850p2
    Case
    D450 x2 & 1 Test bench in cherry Entertainment center
    Cooling
    Custom water loops x3 with 2x mora 360mm rads only 980ti gaming air cooled
    Keyboard
    G710+x3
    Mouse
    Redragon x3
    Internet Speed
    xfinity gigabyte
    Browser
    Firefox
    Antivirus
    mbam pro

Latest Support Threads

Back
Top Bottom