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.

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 Advanced on the right side. (see screenshot below)


Settings-System-Advanced.webp

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_Settings-1.webp

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

Sudo_Settings-2.webp

C) Click/tap on Enable sudo to expand it open, and 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_Settings-3.webp

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_Settings-4.webp

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 My Computer

At a glance

Win-7-10-11Pro's10900k & 9940x & 5930kTrident-Z Royal 4000c16 2x16gb & Trident-Z 36...Titan Xp & 1080ti FTW3 & evga 980ti gaming
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 My Computer

At a glance

Win Server 2025 Insiders (currently 26227)2x E5-2699v4 (44 cores)192GBArc 580
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 My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    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,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    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
    Microsoft Defender
I have several, and before I wrote to you, turned them all off and refreshed. Curious.
 

My Computer My Computer

At a glance

Win Server 2025 Insiders (currently 26227)2x E5-2699v4 (44 cores)192GBArc 580
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 My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    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,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    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
    Microsoft Defender
Back
Top Bottom