Microsoft Explains the Big Difference Between Sudo and Runas in Windows 11


Microsoft Explains the Big Difference Between Sudo and Runas in Windows 11


Sudo is now available on Windows 11 Build 26052 and later. Sudo is a way to run commands or programs with elevated permissions without having to open another instance in Command Prompt or even PowerShell manually. But, Microsoft says that this is not the same as using the Runas command in Windows.

In its first official document we found, the company explains the difference between Sudo and Runas. According to the document, Runas allows you to run commands or programs as any user (even administrator) in Windows. Meanwhile, Sudo cannot run commands or programs like other users.

However, Microsoft hinted at the possibility of running the command as another user with Sudo in the future. You may need to enter your password when using the Runas command, right? But when using Sudo, it is only necessary to accept the UAC Prompt and grant administrative permissions.

Looking like the diagram above, Microsoft explains how Sudo interacts with the operating system when you type commands in the terminal process. For a small example, when you try to run netstat -ab using sudo (for example, sudo netstat -ab), the terminal sends your commands to the CLI shell (such as PowerShell or Command Prompt).

The shell then communicates with the console driver (ConDrv) to handle input/output. The program sudo.exe active, establishes an RPC connection to run the netstat -ab command. For those who don't know, RPC (Remote Procedure Call), which is used for communication between processes on the same machine.

Sudo.exe with elevated privileges run netstat -ab, which allows it to perform its tasks with administrative privileges. In an Inline or Inputdisabled configuration, an unupgraded Sudo.exe process creates an RPC connection with a new Sudo.exe process with elevated permissions.

Sounds easy and simple, right? However, you should be aware of security complications when using Sudo with Inline or Inputdisabled configurations. Microsoft recommends using the new window configuration in Sudo because this is the most secure option of the three options.

Sudo itself is planned to only be given to the exclusive version of Windows 11, which will come in Windows 11 Home, Enterprise, Edu and Pro versions only. The company also confirmed that Sudo was developed with an Open-Source system, aka free