You can run commands from Cygwin with elevated permissions.

On Windows, you have something like Run as different user or Run as administrator. And on Linux, you probably use the sudo command for this.

To get similar functionality on Cygwin, you can add a new alias to your shell’s config file. The following is for Zsh, but it should also work for other bash-like shells.

alias sudo='cygstart --action=runas'

Now you can run something like this to test the alias.

$ sudo touch sudo-test

Windows will ask for your username and password. Then it will run the command in the context of the given user.

That works, but the user experience is not great.

Your command gets executed in a new Cygwin process which automatically exits when the command returns. Also, the user prompt is GUI based which interrupts your CLI workflow.