The sudo command stands for “superuser do” and is likely one of the most vital instructions to know in Unix and Linux-based working programs. (See crucial Linux instructions for newcomers.)
Sudo means that you can execute packages with the safety rights of one other consumer—normally the superuser or administrator/root—with out having to accumulate administrative rights for your complete system.
That is notably helpful for administrative duties that require elevated privileges with out you needing to always go online and off as an administrator or root consumer.
Now, this nifty command can be being launched in Home windows.

Thomas Joos
Thomas Joos
Thomas Joos
Using sudo will increase total system safety in two methods: first, by decreasing the necessity so that you can log in with a full administrator account with unchecked privileges, and second, by creating detailed logs of all of the instructions used with sudo.
Typical examples of sudo utilization contain the set up of software program packages and the adjustment of safety authorizations. Due to its fine-grained management and logging, sudo ensures that administrative duties are carried out securely and traceably.
Sudo enhances RunAs
Microsoft has acknowledged the benefits of sudo and is now bringing the command to Home windows 11 programs with the Home windows 11 model 24H2 replace. It’s not but clear whether or not Home windows Server 2022/2025 may also obtain sudo, however it’s unlikely.
Dubbed Sudo for Home windows, the supply code is offered on Github.
In the event you’re on an administrator account, you have already got administrative rights anyway so sudo is of little use. Plus, in Home windows, there’s already the RunAs command, which helps you to begin a command within the command line utilizing one other consumer account.
Nonetheless, RunAs is cumbersome and never as efficient as sudo.

Thomas Joos
Thomas Joos
Thomas Joos
The RunAs command is used within the format runas /consumer program
, the place the password of the desired consumer have to be entered. For instance, runas /consumer cmd
begins the Command Immediate with administrator rights.
RunAs permits you (Consumer A) to begin a program within the consumer context of Consumer B. In different phrases, Consumer A can launch an software as in the event that they had been Consumer B, and the respective software then runs fully within the context of Consumer B, NOT within the context of Consumer A with elevated rights.
Compared, the sudo command affords related performance however with some variations in software and administration. For now, it isn’t potential with sudo to begin a program as should you had been another person; sudo means that you can execute instructions as superuser/administrator/root. (Nonetheless, Microsoft is planning so as to add this performance.)
Whereas RunAs permits momentary elevation of permissions for a particular program or script, sudo gives extra complete and versatile management over permissions and logging. The sudo command additionally helps the delegation of particular instructions with out full administrator rights, permitting finer management of system administration.
Finally, sudo affords extra choices than RunAs. Nonetheless, Microsoft has up to now carried out only a few of the features accessible within the authentic sudo command in Home windows, so Sudo for Home windows presently has little in frequent with sudo in Linux.
Enabling sudo in Home windows 11 model 24H2
Sudo isn’t enabled by default on all programs, which can or could not change sooner or later. Whereas Sudo for Home windows is pre-installed beginning with Home windows model 24H2, you’ll should allow it your self.
If you enter the sudo command on the command line, within the terminal, or in PowerShell, Home windows 11 model 24H2 says that the command should first be activated:

Thomas Joos
Thomas Joos
Thomas Joos
Within the Home windows 11 settings, the corresponding possibility may be discovered beneath System > For builders at Allow Sudo. Earlier than closing activation, you should verify by way of the Consumer Account Management message.

Thomas Joos
Thomas Joos
Thomas Joos
You can too activate Sudo for Home windows utilizing the sudo command itself, the place varied choices can be found to you:
- In a brand new window (
forceNewWindow
) - In the identical window (
regular
) - Disable enter (
disableInput
) - Deactivate sudo (
disable
) - Allow sudo (
allow
)
When beginning sudo, you’ll be able to already specify the configuration through which you wish to use the device, for instance with:
sudo config --enable forceNewWindow
(be aware the 2 dashes)
The choice forceNewWindow
is helpful because it means that you can rapidly acknowledge when a command with sudo runs with elevated rights.
It’s essential to run the activation as soon as with administrator rights in Home windows and make sure the Consumer Account Management.

Thomas Joos
Thomas Joos
Thomas Joos
After activation, you can begin packages with Sudo, for instance with:
sudo netstat -ab
This command will open in a brand new window (should you used the forceNewWindow
possibility throughout activation).
This text initially appeared on our sister publication PC-WELT and was translated and localized from German.