Thursday, 16 January 2020

windows - There's no 'sudo' command in Cygwin


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?



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.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...