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

  • Disable_sudo.reg
    584 bytes · Views: 23
  • Enable_sudo_in_a_new_window.reg
    584 bytes · Views: 41
  • Enable_sudo_inline.reg
    584 bytes · Views: 7
  • Enable_sudo_with_input_disabled.reg
    584 bytes · Views: 25
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
In Opt 1, I see the text ...on For developers on the right side. (see screenshot below) but I don't see a screenshot.
 

My Computer

System One

  • OS
    Win Server 2025 Insiders (currently 26212)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self built
    CPU
    i7-13
    Motherboard
    Asus Prime Z-790
    Memory
    64GB
    Graphics Card(s)
    Arc 580
    Monitor(s) Displays
    3 x Samsung LU something or another, equivalent to Asus VG28UQL1
    Screen Resolution
    3x4k
    Hard Drives
    SSDs: (1) SPCC "SPCCM.2PCIeSSD" (4TB) (2) PNY CS31400 (2TB) (3) Gigabyte-ASM2NE6 (1TB)
    PSU
    850W
    Case
    TT Tower 500
    Cooling
    6xIceberg Thermal IceGALE 120mm, 2xIceberg Thermal IceGALE 140MM, ThermalTake 360 CPU Cooler
    Keyboard
    2xMS Sculpt
    Mouse
    2xLogitech MX Master (2 and 3)
    Internet Speed
    1GB
    Browser
    Thorium
    Other Info
    Also 36TB SAN. And additional 14 SAS Drives
In Opt 1, I see the text ...on For developers on the right side. (see screenshot below) but I don't see a screenshot.
Hey mate. The screenshot is showing for me.

Do you have an extension or anything else installed for the browser that could be blocking or causing an issue with it?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
I have several, and before I wrote to you, turned them all off and refreshed. Curious.
 

My Computer

System One

  • OS
    Win Server 2025 Insiders (currently 26212)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self built
    CPU
    i7-13
    Motherboard
    Asus Prime Z-790
    Memory
    64GB
    Graphics Card(s)
    Arc 580
    Monitor(s) Displays
    3 x Samsung LU something or another, equivalent to Asus VG28UQL1
    Screen Resolution
    3x4k
    Hard Drives
    SSDs: (1) SPCC "SPCCM.2PCIeSSD" (4TB) (2) PNY CS31400 (2TB) (3) Gigabyte-ASM2NE6 (1TB)
    PSU
    850W
    Case
    TT Tower 500
    Cooling
    6xIceberg Thermal IceGALE 120mm, 2xIceberg Thermal IceGALE 140MM, ThermalTake 360 CPU Cooler
    Keyboard
    2xMS Sculpt
    Mouse
    2xLogitech MX Master (2 and 3)
    Internet Speed
    1GB
    Browser
    Thorium
    Other Info
    Also 36TB SAN. And additional 14 SAS Drives
I have several, and before I wrote to you, turned them all off and refreshed. Curious.
Might test using another browser to see how it shows in it.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium

Latest Support Threads

Back
Top Bottom