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.

Similar Reads

What is ‘Sudo for Windows’?

Microsoft is including the ‘sudo’ command, into Windows 11, popularly used in Unix-based systems like Linux and macOS. ‘Sudo for Windows’ will allow developers to run programs with higher security benefits or as another user directly from an unelevated console session. This provides an efficient and user-friendly approach....

How to Enable Sudo for Windows

For developers excited about ‘Sudo for Windows,’ the process is easy. Follow these simple steps to enable ‘Sudo for Windows’ on your Windows 11 system:...

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:...

Is Sudo for Windows Safe

Microsoft has been committed to user security since the beginning. With Sudo for Windows, Microsoft assures users of a focus on an easy and secure experience. By activating ‘Sudo for Windows,’ developers will start using a powerful tool that not only improves command execution but also prioritizes the safety of the overall development environment on the Windows platform....

How to Use Sudo for Windows

To use Sudo for Windows, simply insert “sudo” at the beginning of the command you wish to execute with administrator privileges. For example, if you intend to run the command “ipconfig /flushdns” as an administrator, you would enter “sudo ipconfig /flushdns” in your console window....

Security Considerations

Running sudo in the Input closed (inputClosed) or Inline (normal) configurations comes with certain risks. Malicious processes might attempt to manipulate the elevated process using the connection established by the unelevated sudo.exe and the elevated sudo.exe process....

Conclusion

Microsoft’s ‘Sudo for Windows’ shows its efforts to make Windows comfortable for developers, and to be able to create a complete environment that helps with different needs. As developers explored this new feature in Windows 11, they took a step towards a developer-friendly ecosystem. Keep an eye on upcoming Windows updates for ‘Sudo for Windows’....

FAQs on Microsoft Introduces Sudo for Windows

How do I run the sudo command in Windows 11?...

Contact Us