Windows 11 Gets Linux’s Sudo Command

What to know

  • Windows 11 will soon allow developers to use Linux-based Sudo commands.
  • Sudo commands allow users to run program elevated programs directly from unelevated consoles. 
  • Currently, Sudo can be enabled on Windows 11 Canary build 26052. It will be rolled out to stable builds gradually over the course of the year.

Windows 11 will soon allow developers the ability to run elevated programs directly from unelevated consoles using in-built sudo commands. Here’s what the latest developments have to offer to developers on Windows.

Related: Here Are the Two Ways to Enable Sudo in Windows 11 (Using Settings or CMD)

Windows gets in-built Sudo command

Sudo, or “superuser do” is a privilege afforded to Linux and other Unix-based systems to run programs in an elevated environment without having to open first open elevated consoles first. 

Furthermore, developers will be able to configure how sudo runs application in three ways –

  • In a new window
  • With input disabled
  • Inline

The latter is the closest to the Linux sudo. 

Although Microsoft has announced the feature’s availability on Windows, currently, the ability to use sudo commands is available only on Canary version 26052. Users with stable Windows 11 builds will have to wait a while before the feature is rolled out to them later in the year. Refer to our guide on how to enable Sudo in Windows 11.

Microsoft had earlier added brought the full Linux kernel to Windows, giving users the ability to test scripts directly within a Linux environment. With the addition of Sudo, developers will be able to run elevated commands without having to open new elevated consoles first. On top of that, Microsoft has also announced that it’s working on open-sourcing Sudo for Windows on GitHub. More details are soon to follow. So be sure to keep your eyes peeled for more updates. 

er(t,c,{passive:!0})}),n.forEach(function(t){var e=t.getAttribute("data-src");if(!e.startsWith("data:")){var n=document.createElement("link");n.rel="preload",n.as="script",n.href=e,document.head.appendChild(n)}}),n.length&&o(0),r.forEach(function(t){t.href=t.getAttribute("data-href")})}}(),t=window.devicePixelRatio>1?2:1,document.querySelectorAll("img[data-origin-src]").forEach(function(e){var n=100*Math.ceil(e.offsetWidth*t/100),r=e.getAttribute("data-origin-src");e.src=r+"?width="+n}),e=new IntersectionObserver(function(t){t.forEach(function(t){t.isIntersecting&&(e.unobserve(t.target),t.target.getAttribute("data-lazy-attributes").split(",").forEach(function(e){var n=t.target.getAttribute("data-lazy-".concat(e));t.target.setAttribute(e,n)}))})},{rootMargin:"300px"}),document.querySelectorAll("[data-lazy-method='viewport']").forEach(function(t){e.observe(t)})});