Finally, the 'sudo' command appears in Windows



The 'sudo' command has been added to

the Insider Preview version of Windows 11. You can now run commands that require administrator privileges even from a normal console session.

Introducing Sudo for Windows! - Windows Command Line
https://devblogs.microsoft.com/commandline/introducing-sudo-for-windows/



To use the 'sudo' command, you must first enable 'Enable sudo' on the 'For developers' page in the settings. Also, on the settings page, you can select how to run sudo from three patterns: ``Run in a new window,'' ``Run with input disabled,'' and ``Run inline.''



In the initial state, the mode is 'Launched netstat in a new window.' )'It will be displayed.



Then, a new console window with administrator privileges opens and the process is executed. Environment variables are preserved.



'Run with input disabled' mode runs the process in the window where you entered the sudo command, but it does not accept input from the user, so it cannot be used if any input other than the first command is required.

'Inline' mode is most similar in behavior to the 'sudo' command on Linux, etc., and runs the process in the window where you enter the sudo command, maintaining all connections to stdin, stdout, and stderr.

In the two modes of running sudo on a console without administrator privileges, a new sudo is running internally with administrator privileges, and the two sudos are RPC connected and input/output is redirected. About. This makes it appear as if an elevated process is running in a console window without administrator privileges.



Microsoft is working on open sourcing sudo for Windows and plans to share detailed information in the coming months. It also states that they are looking for feedback on sudo for Windows in the GitHub repository .

◆Forum now open
A forum related to this article has been set up on the GIGAZINE official Discord server . Anyone can write freely, so please feel free to comment! If you do not have a Discord account, please create one by referring to the article explaining how to create an account!

• Discord | “What would be useful if you could use “sudo” on Windows?” ' | GIGAZINE
https://discord.com/channels/1037961069903216680/1205447466774962249

in Software, Posted by log1d_ts