ADMX Viewer
Microsoft.Policies.DeveloperTools• Machine

Configure the behavior of the sudo command

This policy setting controls use of the sudo.exe command line tool. If you enable this policy setting, then you may set a maximum allowed mode to run sudo in. This restricts the ways in which users may interact with command-line applications run with sudo. You may pick one of the following modes to allow sudo to run in: "Disabled": sudo is entirely disabled on this machine. When the user tries to run sudo, sudo will print an error message and exit. "Force new window": When sudo launches a command line application, it will launch that app in a new console window. "Disable input": When sudo launches a command line application, it will launch the app in the current console window, but the user will not be able to type input to the command line app. The user may also choose to run sudo in "Force new window" mode. "Normal": When sudo launches a command line application, it will launch the app in the current console window. The user may also choose to run sudo in "Force new window" or "Disable input" mode. If you disable this policy or do not configure it, the user will be able to run sudo.exe normally (after enabling the setting in the Settings app).

Policy Details

Policy Name
EnableSudo
Registry Key
Software\Policies\Microsoft\Windows\Sudo
Supported On
At least Windows 11
OMA-URI (CSP)
Sudo/EnableSudo
OS Build Version:10.0.26100
CSP Version:11.0
Conflict Resolution:LowestValueMostSecure
Allowed Editions:
EnterpriseEnterprise NProfessionalProfessional NEnterprise EvaluationEnterprise N EvaluationEducationEducation NEnterprise SEnterprise S NEnterprise S EvaluationEnterprise S N EvaluationPro Single LanguagePro ChinaPro WorkstationPro Workstation NPro For EducationPro For Education NEnterprisegEnterprisegnIotenterpriseIotenterprisesCloudeditionnCloudeditionIotenterprisesk
Available Languages
en-us

Configuration Elements

Maximum allowed sudo mode

Type: enum

Allowed Values
  • 0 Disabled
  • 1 Force new window
  • 2 Disable input
  • 3 Normal