The sudo command is coming to Windows 11
The sudo command is coming to Windows 11
Sudo, short for "substitute user, do", allows executing commands with elevated privileges to install applications, uninstall components, change settings, and perform other advanced tasks. Sudo is a command in Unix systems and Unix-based operating systems such as Linux, macOS, and some BSDs. Using sudo, users can perform tasks that require special permissions without logging in as root.
At the beginning of 2024, the Windows enthusiast community accidentally discovered the first clues about the appearance of the sudo command on Windows 11. Now, we have more details thanks to one of the builds. preview of Windows Server 2025 (this command is expected to be available in consumer versions of Windows 11).
Microsoft has not yet officially announced sudo for Windows, so details of the plan and implementation are still quite vague. However, screenshots provided by @thebook on X (Twitter) have revealed some interesting information.
Getting sudo to work on Windows 11 will require activating Developer Mode, a popular feature among app creators and Windows enthusiasts who want to access additional features. Windows 11 will then allow you to enable sudo and configure command behavior. There will be an additional prompt asking to confirm that you understand the risks of using the sudo command.
Available options for configuring sudo on Windows 11 will reportedly include "In a new window" (elevated command launches in new window), "With input disabled" and "Input route" (run the command in the same window).
Interestingly, third-party projects like gsudo have allowed users to use sudo on modern versions of Windows to elevate privileges in an existing or new console window.
Which Windows versions can run sudo commands?
Microsoft is adding the sudo command to Windows 11 considering that support for Windows 10 is ending soon, but we don't expect to see this command appear anytime soon. At the time of writing, the sudo command is only available to Windows Insider participants (build 26045 and above), specifically those on the Developer and Windows Canary channels.
Unlike some of the features Microsoft tested in these versions, it looks like sudo will be coming to the operating system soon.
How to enable sudo command on Windows
If the sudo command is not yet available for your version of Windows, you need to sign up for Windows Insider. This is a simple process, but be warned: Developer and Canary options can be unstable, so don't use them on a PC where you don't want to lose data.
When you are running a version of Windows that has the sudo command available, activating the command is a simple process. Open the Settings app, then select System on the left and For developers from the main area of the window.
Here, scroll down and enable the checkbox that says Enable sudo.
Enable sudo via Command Prompt
If you're more command-line oriented, you can also enable sudo via Command Command. Ironically, this requires you to run a CMD window with admin rights. Press the Windows key, type "command", then right-click Command Prompt (or PowerShell) and select Run as administrator.
In this prompt, run the following command:
sudo config --enable enable
How to use sudo command on Windows
After activating the sudo command on Windows, usage is very simple. Just add sudo to any commands you typically need to run with admin rights, then accept the next prompt.
An example from Microsoft using the netstat command:
sudo netstat -ab
This feature may seem a bit unnecessary - and for many people it is. That said, if you spend all day running command after command on Windows and long for the simplicity of the sudo command, its addition will make your life easier.
Microsoft seems certain to implement sudo, even going so far as to release sudo on GitHub as open source. If this information makes you want to learn more about what goes on in Windows, make sure to check out this list of commands every Windows user should know.
You should read it
- How to reset the password for sudo in Debian
- Enable Root account in Ubuntu
- 20+ essential Linux security commands
- Basic Linux commands everyone needs to know
- Sub-commands in the nslookup Windows command (Part 1)
- Sub-commands in nslookup Windows command (Part 2)
- Sub-commands in nslookup Windows command (Part 3)
- Command at in Windows
May be interested
- Set command in Windowsthe set command helps show, set or remove cmd.exe environment variables.
- Del command in Windowsthe del command deletes one or more files. this command is the same as the eraser command.
- 10 useful commands in Windows you should knowcommand prompt is used to execute batch files, perform tasks quickly, help you troubleshoot and solve some windows problems when the system crashes. however, not all commands in windows are useful and must be done regularly. with the 10 command lines in the following article it is very useful even if you are not an administrator.
- How to use the option equivalent to the 'ls' command in Windowsthe 'ls' command (note ls, not is) is one of the first terminal commands veterans teach to linux beginners.
- The command reg add in Windowsthe reg add command adds new subkeys or entries to the registry.
- Rem command in Windowsthe rem command helps write comments (comments) in a batch file or config.sys.
- Instructions for using Command Promptdeep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
- Rd command in Windowsthe rd command helps delete a directory
- Cmd command in Windowsthe cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
- How to use the command history function in Command Promptcommand prompt is an extremely familiar command for anyone using windows operating system. besides, a lot of current software also supports the command line to perform actions on the command prompt window, instead of on the screen.