microsoft / sudo

It's sudo, for Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sudo ? really ?

poolpOrg opened this issue · comments

You really couldn't come up with a different name to avoid the confusion when writing a software of your own that did what sudo does but for Windows ?

It's not like sudo is already a software that's widespread and yours is not even compatible with...

As someone who regularly works on Linux, BSD, and Windows, I appreciate that Microsoft supports many common *NIX commands in PowerShell: ls, curl, ssh, cat, clear, cp, echo, kill, mv, ps, rmdir, and now sudo, all just work. It significantly reduces the cognitive load of context switching and allows me to focus on getting the task at hand done. Developers, system administrators, engineers, and power users are likely familiar with sudo from work on other operating systems. Adopting sudo will be easier and make work more efficient for them.

As someone who regularly works on Linux, BSD, and Windows, I appreciate that Microsoft supports many common *NIX commands in PowerShell: ls, curl, ssh, cat, clear, cp, echo, kill, mv, ps, rmdir, and now sudo, all just work. It significantly reduces the cognitive load of context switching and allows me to focus on getting the task at hand done. Developers, system administrators, engineers, and power users are likely familiar with sudo from work on other operating systems. Adopting sudo will be easier and make work more efficient for them.

Except that Microsoft's sudo is not sudo, this is akin to me creating a text editor project and naming it Visual Studio Code or writing a window manager and naming it Windows.

As far as I know, *NIX commands in PowerShell are mimic-ing their unix counterparts, but this is not doing that, literally from the README file:

This project is not a fork of the Linux sudo project, nor is it a port of the Linux sudo project.

*NIX commands in PowerShell are mimic-ing their unix counterparts

Yes, and sometimes the options for those commands differ between their *NIX counterparts and PowerShell implementations, but most of the time they just work.

Another example would be even though Windows has implemented ssh based on OpenSSH, there are still some behavioral differences between ssh on *NIX and ssh on Windows you will run into in some edge cases.

Along those lines, sudo for Windows mimics sudo on *NIX but has a Windows-specific implementation owing to its distinct permissions system.

The goal overall goal, whether it be PowerShell aliases, re-implementation, or integrations of upstream open source tools is similar functionality where possible, subject to differences between the distinct OS lineages, to reduce the friction in day-to-day use for users.

commented

Don't you have aliases or something in DOS? My ls is eza -F and my cat is bat --wrap character -p and so on.

Regardless of that, a project can be named something other than the components it is providing, like the ssh client is provided by, for example, the OpenSSH and Dropbear projects. Why not call it "MS sudo" or "sudo4win"? And, you know, all the cool kids switched from sudo years ago, so you could go with "Windoas".

Also, sudo isn't a kernel project, don't drag Linux into this.

There's a long history of Open Source OSes providing reimplementations of existing commands; there are many implementations of ls, cp, vi, and similar. I don't see anything wrong with providing another implementation of sudo; I think that's a great step towards being compatible with the numerous instructions across the web that show using sudo xyz to run something as root.

That said, since this is using the name sudo, it should (eventually) aim to be compatible with at least the most common options of sudo, such as (eventually) supporting options like -H, -u, -i (possibly just ignored for compatibility), -s, -E, and -D.

Using the name sudo and being largely compatible with the options of sudo seems great. Using the name sudo and not being compatible with the most common sudo options would be a repeat of what happened with curl.

Supporting -u: #3

Supporting -H: #19

Supporting -s: #20

Supporting -E: #21

Supporting -D: #22