I've tried several times to code on Windows. It's nearly impossible for a person used to Unix based systems. Seems it's getting slightly better. Nice.
A chrome plated turd is, underneath the shiny veneer, still a turd.
Sudo for Windows
341–350 of 439 posts
Re: Sudo for Windows
#342This smells like when PowerShell aliased curl and wget to a completely different command, with incompatible arguments. https://github.com/PowerShell/PowerShell/pull/1901
Yes terrible move which will lead to much confusion and consternation in the future. But honestly I'm most amazed by the fact that there wasn't previously a way to run commands with elevated permissions in Windows. How did people work like that? Just run everything in an admin terminal super unsafely?
Re: Sudo for Windows
#343Earlier quoted context omitted.
You have to think about what terminal you need before opening it. I rarely need an admin terminal. That software is often installed by downloading and double click helps as that cuts out the command line. Devops is tricky though! You sometimes have to spawn other processes to get the elevated permissions.
I guess the reason it strikes me as strange is, on linux the usage of `sudo` helps you understand which operations might be dangerous in a fine-grained way So like if you are executing a series of commands, the one requiring admin privileges tends to be one you might want to be more careful about (i.e. altering system configs, or doing a potentially insecure operation) So if you are running everything in an admin ter…
Re: Sudo for Windows
#344Considering the way PowerShell commands go, I assume this will be: RunWithAllTheElevatedPermissionsPossible --YesEvenThose .\inthisfolder.folder\. grep : The term 'grep' is not recognized....
It's evident that you haven't used PowerShell. Almost all commands in PowerShell have short aliases. For instance, instead of typing 'Get-ChildItem', you can simply use 'gci', which stands for the first letters of each word. Unlike Bash and other shells, where you must learn various Domain-Specific Languages (DSLs) to handle XML, JSON, YAML, etc., PowerShell allows you to use its native language to work with any data…
Re: Sudo for Windows
#345Yep, it's really happening. Sudo is coming to Windows. It's obviously not just a fork of the linux sudo - there's enough that's different about the permissions structure between OS's that just a straight port wouldn't make sense. But the dream of being able to run commands as admin, in the same terminal window - that's the experience we're finally bringing to users. I've been working on this for the last few months n…
The real question is, where will incidents be reported to if you're not in the sudoers file?
Re: Sudo for Windows
#346Earlier quoted context omitted.
In addition to not being a one-to-one port, Sudo for Windows is a completely unrelated command. > it does the same function which is to elevate a unprivileged command That's only one of the use cases of Sudo. Here's a description of Sudo from the official manual [1]: > sudo, sudoedit — execute a command as another user Sudo for Windows can't do that. It's mentioned in its FAQ: > the sudo command on Windows does not s…
> like a cat command that can't concatenate files Oh, that's a good counter-example to your own point: 99% of people who use cat don't care about this functionality.
cat *.txt
is a pattern I see being used everywhere.Same goes for sudo. If you're going to claim that a whopping 99% of users don't use the CLI options or /etc/sudoers, you'd need solid proof. Because a simple search shows otherwise:
https://grep.app/search?q=sudo%20-®exp=true
This Sudo for Windows behaves nothing like the actual sudo. It doesn't even achieve the original's stated purpose.
Also considering that search results for anything involving Windows tends to be riddled with spams and outright scams, this will negatively affect non-Windows users searching for sudo as well.
So again, this naming conflict is unfortunate.
Re: Sudo for Windows
#347Here's hoping that "Windows 12" will be just a Window manager + Desktop running on Linux, with all existing bugs meticulously replicated to maintain backwards compatibility with Windows 95/7/8/10/11.
Stop dreaming. Won't happen. Windows is a purely additive effort. WSL is what happened, and when it couldn't do some things they built WSL2. As another commenter pointed out regarding the integration of this new "sudo" and UAC prompts, it will probably be done in a new, separate, different tool, because this new, freshly released "sudo" will now have to remain bug-for-bug compatible for the next four decades.
I always wondered why it wasn't called WslEx.
Re: Sudo for Windows
#348Yep, it's really happening. Sudo is coming to Windows. It's obviously not just a fork of the linux sudo - there's enough that's different about the permissions structure between OS's that just a straight port wouldn't make sense. But the dream of being able to run commands as admin, in the same terminal window - that's the experience we're finally bringing to users. I've been working on this for the last few months n…
The real question is, where will incidents be reported to if you're not in the sudoers file?
Re: Sudo for Windows
#349Earlier quoted context omitted.
> like a cat command that can't concatenate files Oh, that's a good counter-example to your own point: 99% of people who use cat don't care about this functionality.
That's an astonishing claim to make without evidence. cat *.txt is a pattern I see being used everywhere. Same goes for sudo. If you're going to claim that a whopping 99% of users don't use the CLI options or /etc/sudoers, you'd need solid proof. Because a simple search shows otherwise: https://grep.app/search?q=sudo%20-®exp=true This Sudo for Windows behaves nothing like the actual sudo. It doesn't even achieve t…
That's an astonishing claim to make without evidence. I don't see "cat *" being used anywhere. In fact, I've just ran search for usage of "cat" over the repository of shell scripts that are used for the various packaging and deployment tasks in my company (and we have to deploy a lot of stuff, written in different programming languages, and every team packages their stuff into their docker containers in their own way but it's all still documented in this repo) and every single use of cat is either
a) reading data into a variable "VAR=$(cat file_with_data)";
b) writing inline data from script into a file "cat >>$TARGET_FILE c) an entirely reasonable use of cat "cat file | utility_that_accepts_filenames_too", sometimes even "cat file | utility".
None of them take a pattern or more than one file.
UPD: I've ran "cat *\." on the grep.app, and it seems that it's used mostly for bulk log processing; I vaguely recall we moved away from it to using custom reader scripts because the asterisk doesn't expands into the files ordered the way we needed.
Re: Sudo for Windows
#350Considering the way PowerShell commands go, I assume this will be: RunWithAllTheElevatedPermissionsPossible --YesEvenThose .\inthisfolder.folder\. grep : The term 'grep' is not recognized....
It's evident that you haven't used PowerShell. Almost all commands in PowerShell have short aliases. For instance, instead of typing 'Get-ChildItem', you can simply use 'gci', which stands for the first letters of each word. Unlike Bash and other shells, where you must learn various Domain-Specific Languages (DSLs) to handle XML, JSON, YAML, etc., PowerShell allows you to use its native language to work with any data…