> Everything about permissions and the command line experience is different between Windows and Linux. ... certain elements of the traditional sudo experience are not present in Sudo for Windows, and vice versa. Scripts and documentation that are written for sudo may not be able to be used directly with Sudo for Windows without some modification.
Then why is it named `sudo`? Just to create confusion?
Also, something like sudo is clearly not possible on modern Windows, because Microsoft thinks it owns your computer and won't allow Admins to do certain things.
https://m.majorgeeks.com/files/details/nsudo.html
Been using it to run my cleanup or uninstaller utilities as SYSTEM/TRUSTED INSTALLER, so stubborn in use files that are not easily deletable not even with lockhunter or unlock file utilities that ultimately fallback to delete on next reboot.
That would imply it is written for PowerShell specifically ([1]), and would come with several expectations (like returning PSObject objects, and other good practices).
I spent some time years ago going through a PowerShell course by the guys who wrote it. They explained their thought process and it actually made a lot of sense. Descriptive verb-noun naming to makes scripts readable, with aliases to make things quick and easy in the shell.
It’s easier to understand than names like grep, which require the user know ed and decades old history to figure out that it means global regular expression print. Without any *nix history, Select-String with an alias of sls, can make more intuitive sense and be easier to remember. The alias is also faster to type.
That sounds like PowersHell is similar to Esperanto - systematic and regular, but otherwise awkward and just doesn't have the staying power of a real, organically-developed language.
There's no need to "understand" "names like grep"; you learn it as a language like any other. If you aren't thinking of "grepping" (or cd'ing, ls'ing, fsck'ing, etc.) naturally and are always trying to translate the words into English (or some other language), you're doing it wrong.
sudo makes sense as a name, but it is worth noting that it hurts the original projects.
Famously, the curl project receives tonnes of issues and support requests from people who run `curl` in PowerShell, not knowing it is an alias meant for convenience instead of the actual curl command[1].
Sudo for windows is already relatively old and doesn't seem to have been adopted much, but my prediction is that adoption would mean people would complain on forums that commands they found on the internet don't work. "Why wouldnt it? I have sudo?". Then people will have to explain to them that "No you do not have sudo, you have the windows version of sudo, which is not real sudo" and it will confuse.
When it comes to tools, I strongly believe naming things similarly to concepts the user already knows is a disservice to the user. This isn't UX for your mom and pop, it is a tool to perform a job, and learners get confused when suddenly the same thing isn't actually the same thing at all. It is mislearning, and I would argue almost anyone who does mentoring has seen this in action.
The curl alias in powershell is not compatible so it is an inconvenience. Must be one of the worst decisions to make it into windows, which is saying a lot.
There is more than one sudo implementation though and the configuration can be already different. Also I don't think you accidentally forget whether you are in a POSIX or a CMD shell.
I keep waiting for Microsoft to give up on maintaining their own kernel and moving to Linux. Kind of like what they did with the browser engine, and building atop Chrome.
Unless this is improved greatly from the last time I used it is pointless, any command you would use it for instead requires you to right click, open as administrator a command prompt to get the expected result
It's not sudo for Windows, it's a pile of rust which, if you figure out how to assemble it, presumably turns into some Microsoft interpretation of sudo which, judging by all the open issues, might be an attempt at grep that went wrong somewhere.
If you want a proper sudo for Windows, use gerardog's excellent gsudo, https://github.com/gerardog/gsudo. Among other things it comes with prebuilt binaries and installers.
37 comments
[ 3.8 ms ] story [ 53.3 ms ] threadThen why is it named `sudo`? Just to create confusion?
Also, something like sudo is clearly not possible on modern Windows, because Microsoft thinks it owns your computer and won't allow Admins to do certain things.
Program Name: Sudo.exe
Publisher: Unknown
File Origin: Downloaded from the Internet
With nsudo its fizz
[1]: https://learn.microsoft.com/en-us/powershell/scripting/devel...
It’s easier to understand than names like grep, which require the user know ed and decades old history to figure out that it means global regular expression print. Without any *nix history, Select-String with an alias of sls, can make more intuitive sense and be easier to remember. The alias is also faster to type.
There's no need to "understand" "names like grep"; you learn it as a language like any other. If you aren't thinking of "grepping" (or cd'ing, ls'ing, fsck'ing, etc.) naturally and are always trying to translate the words into English (or some other language), you're doing it wrong.
Famously, the curl project receives tonnes of issues and support requests from people who run `curl` in PowerShell, not knowing it is an alias meant for convenience instead of the actual curl command[1].
Sudo for windows is already relatively old and doesn't seem to have been adopted much, but my prediction is that adoption would mean people would complain on forums that commands they found on the internet don't work. "Why wouldnt it? I have sudo?". Then people will have to explain to them that "No you do not have sudo, you have the windows version of sudo, which is not real sudo" and it will confuse.
When it comes to tools, I strongly believe naming things similarly to concepts the user already knows is a disservice to the user. This isn't UX for your mom and pop, it is a tool to perform a job, and learners get confused when suddenly the same thing isn't actually the same thing at all. It is mislearning, and I would argue almost anyone who does mentoring has seen this in action.
[1]: https://daniel.haxx.se/blog/2016/08/19/removing-the-powershe...
Because probably this was pushed due to meet some OKRs ("made an impact").
It adds nothing over runas, other than being a known name to folks educated in UNIX.
Which is hardly of any benefit, given that Windows is not UNIX.
If you want a proper sudo for Windows, use gerardog's excellent gsudo, https://github.com/gerardog/gsudo. Among other things it comes with prebuilt binaries and installers.