Run elevated Windows terminal commands without opening a separate admin window by typing 'gsudo' before any command
Use gsudo in scripts to automate privileged tasks and check success via exit codes
Re-run the last command with admin rights instantly using 'gsudo !!' without retyping it
Reduce repeated UAC popups during a session by enabling gsudo's optional credential cache
Windows-only, install via Scoop, WinGet, Chocolatey, or MSI, no background services.
gsudo is a Windows version of the Unix/Linux command called "sudo." On Linux and macOS, sudo lets you prefix any command with the word "sudo" to run it with administrator-level permissions. Windows has always lacked a built-in equivalent, requiring users to right-click and choose "Run as administrator" or open a separate elevated terminal window. gsudo adds that missing behavior to Windows. With gsudo installed, you type "gsudo" (or "sudo" using the alias it creates) before any command in your terminal, and that command runs with administrator rights. A Windows UAC confirmation popup appears once. There is an optional cache feature that, if you enable it, reduces how often those popups appear during a session by remembering that you already confirmed once. The tool works inside the same terminal window you are already using, rather than opening a new one. It detects which shell you are running (CMD, PowerShell, WSL, Git-Bash, and several others) and adjusts its behavior accordingly. You can also use it in scripts, pipe its output to other commands, and check whether the command succeeded via exit codes. A shortcut called "gsudo !!" re-runs the last command you typed with elevated permissions. Installation is available through several Windows package managers including Scoop, WinGet, and Chocolatey, or via a downloadable MSI installer from the releases page. There is also a portable version that requires no system-wide installation. The tool itself is a single executable that does not install any background services. gsudo is aimed at developers and technical users who frequently need to run elevated commands from the terminal and want the same quick workflow that sudo provides on Unix systems. It is a command-line tool with no graphical interface of its own.
← gerardog on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.