Site icon WindowsLoop

How to Enable Sudo on Windows 11

Windows 11 sudo featured

On Windows 11, you can now use the sudo command to run programs and other commands as an administrator. Generally, you’d have to open the Terminal, Command Prompt, or PowerShell as an administrator first and then run the commands in it if you want to execute them with admin privileges. You can eliminate all this by enabling the sudo command. In this tutorial, we’ll show you how to enable the sudo command on Windows 11 and how to configure it. Let’s get started.

Update Windows 11

Ensure Windows 11 is up-to-date. To use this new feature, your Windows 11 build should be 26052 or higher. To check it, press “Windows key + R,” type “winver” in the Run window, and click “OK.” You will see the build number at the top of the About Windows window.

Steps to Enable Sudo Command

1. Right-click on the Start icon on the taskbar and select Settings.

2. Navigate to the System tab on the sidebar.

3. Click the For Developers option on the right page.

4. Turn on the Enable Sudo toggle.

With that, you’ve enabled the sudo functionality on Windows 11.

Configure Sudo Command Mode

To change the sudo’s configuration mode, open the Settings window, navigate to System > For Developers, and choose a mode from the Configure how sudo runs applications dropdown.

The sudo command on Windows 11 has three configuration modes, new window, input closed, and inline. Here’s what they mean and how to configure them.

Using Sudo Command

Right-click on the Windows logo on the taskbar and select Terminal.

In the terminal window, run the sudo <your-command> command where you replace “<your-command>” with the command or program of your choice. When you see the UAC prompt, click Yes to continue.

For example, to clear DNS as admin with the sudo command, you should run the command as shown below.

sudo ipconfig /flushdns

And there you have it! It’s that simple to enable sudo on Windows 11. If you have any questions, comment below and we’ll answer.

Exit mobile version