gsudo (sudo for Windows)
The missing piece in Windows. Cherry-pick which commands to elevate with just one keyword.
Easy to Use
Prepend gsudo
to make your command run elevated in the current console window. Just as Unix/Linux sudo. One UAC popup will appear.
Learn more
Easy to Install
Using Chocolatey: choco install gsudo
Using Scoop: scoop install gsudo
Using WinGet: winget install gerardog.gsudo
Learn how to install.
Portable
gsudo is just a portable console app. No Windows service is required or system change is done, except adding gsudo to the Path.
Supports your preferred shell
Detects your shell and elevates your command as a native shell command. Currently supports CMD
, PowerShell
, WSL
, MinGW/Git-Bash
, MSYS2
, Cygwin
, Nushell
, Yori
and Take Command
.
Credentials Cache
Too many UAC pop-ups? You can see less popups if you opt-in to enable the credentials cache
, once you understand the security implications.
Learn more.
Increase your productivity
Do not waste time opening a new window and switching context back and forth. Also avoid the "elevation fatigue" that leads to the malpractice of running everything elevated, and just elevate specific commands.