gsudo is a sudo equivalent for Windows that allows you to run commands with elevated permissions from your current console window.
The tool solves the friction of Windows privilege elevation by providing a Unix-like sudo experience. Rather than using the native runas command or right-clicking to open an elevated prompt, you simply prepend gsudo to your command. It detects your current shell environment—whether CMD, PowerShell, WSL, Git Bash, MinGW, Cygwin, or several others—and elevates the command natively within that shell. A UAC popup appears each time unless you enable the credentials cache, which allows multiple elevated commands to run with a single prompt.
Developers and system administrators accustomed to Unix/Linux workflows will find gsudo most valuable, particularly those working across Windows and Unix-like systems or using WSL. It suits any project where command-line privilege elevation is frequent enough to justify avoiding the overhead of opening a new elevated window. The tool integrates seamlessly into scripts, preserving stdout, stderr, and exit codes so output can be piped or captured normally. If you run gsudo from an already-elevated console, it executes without prompting, making it safe to use in scripts regardless of the caller's privilege level. The project explicitly positions itself as a Windows alternative to Unix sudo, making the comparison implicit in its design rather than through documented alternatives.
Development activity shows consistent maintenance with regular updates addressing edge cases and shell compatibility. The project maintains broad shell support, regularly adding detection for additional terminal environments. Bug fixes and feature requests receive attention, and the maintainer actively documents known issues and limitations rather than obscuring them.