How to Configure Sudo for Windows
Configuring Sudo for Windows offers three different options that you can choose from. You can adjust these settings either through the Settings menu or by using the command line. Here are the available configuration options:
In a New Window (forceNewWindow)
By default, Sudo for Windows runs commands in a new window. This setting is similar to how the “runas /user:admin” command works.
Input Closed (disableInput)
With this option, the elevated process runs in the current window, but the input handle is closed. This means the process won’t accept input from the current console window. It’s handy when you need to run a command as an administrator but don’t want it to interact with the current console window.
Inline (normal)
This configuration closely resembles how sudo operates on other operating systems. The elevated process runs in the current window and can accept input from the console session. It’s useful when you want the command to run as an administrator and interact with the current console window. However, be cautious as this option comes with security risks.
You can choose these configurations from the Settings menu or adjust them programmatically using an elevated command line (admin console). Here’s how to do it:
sudo config –enable <configuration_option>
Replace <configuration_option> with either forceNewWindow, disableInput, or normal.
Microsoft is bringing Linux’s Sudo command to Windows 11
Microsoft persists in its embrace of Linux, solidifying Windows as a welcoming environment for developers.
Microsoft continues to succeed with Linux by bringing the popular ‘sudo’ command to Windows 11. The introduction of ‘Sudo for Windows’ is specifically for developers, giving a solution for running elevated tools directly from an unelevated console session. This move follows Microsoft’s previous actions, including shipping a full Linux kernel in Windows 10 and incorporating Linux features.
Contact Us