You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Reacted by Cyrus Najmabadi, Dustin L. Howett, Twometer, Alex, Thales, Clément, Gerardo Grignoli, James Seden Smith, Joris Snellenburg, Federico Caselli and 3 more
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.
Reacted by Benoit D
Reacted by Alex, Charles Flanders, Justin Hammond, Thales, Ashlynne Mitchell and Jesse Connop
*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.
Reacted by Alex, Thales, Aqil Contractor, James Seden Smith, Ashlynne Mitchell and Jesse Connop
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.
Activity
sirredbeard commentedon Feb 8, 2024
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 nowsudo, 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 withsudofrom work on other operating systems. Adoptingsudowill be easier and make work more efficient for them.poolpOrg commentedon Feb 8, 2024
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:
sirredbeard commentedon Feb 8, 2024
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
sshbased on OpenSSH, there are still some behavioral differences betweensshon *NIX andsshon Windows you will run into in some edge cases.Along those lines,
sudofor Windows mimicssudoon *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.
omnivagant commentedon Feb 9, 2024
Don't you have aliases or something in DOS? My
lsiseza -Fand mycatisbat --wrap character -pand so on.Regardless of that, a project can be named something other than the components it is providing, like the
sshclient 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 fromsudoyears ago, so you could go with "Windoas".Also, sudo isn't a kernel project, don't drag Linux into this.
joshtriplett commentedon Feb 9, 2024
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 ofsudo; I think that's a great step towards being compatible with the numerous instructions across the web that show usingsudo xyzto 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 ofsudo, such as (eventually) supporting options like-H,-u,-i(possibly just ignored for compatibility),-s,-E, and-D.Using the name
sudoand being largely compatible with the options ofsudoseems great. Using the namesudoand not being compatible with the most commonsudooptions would be a repeat of what happened withcurl.Supporting
-u: #3Supporting
-H: #19Supporting
-s: #20Supporting
-E: #21Supporting
-D: #22