sudo for windows
Switch branches/tags
Nothing to show
Clone or download
Latest commit 41f6a49 Jun 16, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE add LICENSE Jun 7, 2017
README.md update README.md 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

README.md

sudo

sudo for windows

Build status

Usage

C:\>sudo cmd /c dir

Then, you'll see the UAC dialog.

Tutorials

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" 33.33.33.33 255.255.255.255

Edit hosts file

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

Create admin's console

sudo

Installation

go get github.com/mattn/sudo

requirement go1.8 or later.

Or download from release tab.

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)