Winget and Windows sudo Compatibility
#5565
Unanswered
SamGreenwood1
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone,
With the recent introduction of the native
sudocommand in Windows 11 Insider Previews, I've been thinking a lot about how it might interact with existing command-line tools, especially Winget. I'm curious to hear the community's thoughts and if anyone has insights into the future here.The Context and My Question
For those not fully up to speed, the new Windows
sudocommand allows users to elevate privileges for specific commands directly from an un-elevated terminal, similar to howsudoworks on Linux/macOS. This is a pretty big deal for command-line workflows.Currently, when you use
wingetfor operations that require admin rights (likewinget installorwinget upgradefor system-wide installations), you typically either get a UAC prompt or you have to launch your terminal as an administrator from the get-go.My main question is: Are there any plans or ongoing discussions to make Winget fully compatible with the new Windows
sudocommand? I'm wondering if the Winget team is looking into seamless integration, or ifsudo winget install <packageID>could eventually just work without an additional UAC prompt coming from Winget itself.Why This Matters (and an Example)
I see a few clear advantages if this compatibility happens:
sudoas our go-to for elevated commands, havingwingetflow directly through it would be incredibly smooth. No more juggling separate UAC prompts or remembering to open an admin terminal.sudois standard, or just for anyone trying to maintain consistent command-line practices on Windows.Ideally, I'd love to see something like this work without a hitch:
...with
sudohandling the elevation forwinget, rather thanwingettriggering its own UAC prompt afterwards.I'd appreciate any information, speculation, or technical considerations anyone might have on this topic. Has anyone seen discussions on the Winget GitHub or heard anything official? Or perhaps you have thoughts on why this might be challenging or even unnecessary?
Let's discuss!
See discussion I posted to the (Windows) sudo repo here.
Beta Was this translation helpful? Give feedback.
All reactions