sudo for windows
Branch: master
Clone or download
Latest commit 41f6a49 Jun 16, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE add LICENSE Jun 7, 2017 update Jun 16, 2017
appveyor.yml after_build Jun 16, 2017
client.go don't break loop at close Jun 14, 2017
main.go just call cmd instead of using start Jun 9, 2017
other.go add build constraints Jun 8, 2017
server.go pass os.Environ() Jun 8, 2017
spawn.go add missing file Jun 14, 2017
util.go add build constraints Jun 8, 2017
util_test.go add test Jun 15, 2017
win32.go add -spawn for GUI apps Jun 9, 2017


sudo for windows

Build status


C:\>sudo cmd /c dir

Then, you'll see the UAC dialog.


Display contents of file which can't access from you

sudo cmd /c type secret-file.txt > accessible-file.txt

Pipe from/to stream

echo 123 | sudo my-command.exe | more

Change IP address

sudo netsh interface ip add address "Local Area Connection"

Edit hosts file

sudo notepad c:\windows\system32\drivers\etc\hosts

Create admin's console



go get

requirement go1.8 or later.

Or download from release tab.




Yasuhiro Matsumoto (a.k.a. mattn)