System Enable or Disable Sudo Command in Windows 11


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) and and build 26100.712 (RP), 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.

Sudo for Windows is a new way for users to run elevated commands (as an administrator) directly from an unelevated console session. The sudo command can be configured to run in three different modes:
  • In a new window: The elevated command runs in a new window. This mode is similar to the behavior of the runas /user:admin command.
  • With input disabled: Runs the elevated process in the current window, but with the input handle closed. This means that the elevated process won't be able to receive input from the current console window.
  • Inline: Runs the elevated process in the current window and the process is able to receive input from the current console session. This mode is most similar to the sudo experience on other platforms.
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

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 26227)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell T7910
    CPU
    2x E5-2699v4 (44 cores)
    Motherboard
    Dell
    Memory
    192GB
    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) 3x SPCC "SPCCM.2PCIeSSD" (4TB) (2) PNY CS31400 (2TB) (3) Gigabyte-ASM2NE6 (1TB),
    PSU
    2x850W
    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 15 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
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
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 26227)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell T7910
    CPU
    2x E5-2699v4 (44 cores)
    Motherboard
    Dell
    Memory
    192GB
    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) 3x SPCC "SPCCM.2PCIeSSD" (4TB) (2) PNY CS31400 (2TB) (3) Gigabyte-ASM2NE6 (1TB),
    PSU
    2x850W
    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 15 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
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender

Latest Support Threads

Back
Top Bottom