No ‘sudo’ Command in Cygwin – What to Do

command linecygwin;windows

Because there's no sudo command in Cygwin, scripts that I want to run fail with

./install.sh: line N: sudo: command not found

What's the standard way for getting around this? Editing the scripts to remove sudo? Getting some sudo-like tool for Windows?

Best Answer

I wrote the (rather simple) TOUACExt for SUDO for CygWin, a pre-beta shell script automation that approaches to the behavior of classical sudo for Linux:

  • Open and closes automatically sudoserver.py when needed.
  • Requests UAC Elevation Prompt.

Installation requires copying the four .sh scripts to some path directory, creating an alias and just a few more steps detailed in the thread.

The results: you type a single sudo YourCommand and you get the output of it, without having to worry about the rest of the process.

Related Question