In the comments section of a recent post I found out that Windows PowerShell had been ported to Linux. Had no clue it was a thing.
Went looking and found this old article attempting to explain why they did it. Not remotely interested in giving up Bash for PowerShell, but I thought it was interesting enough to share. The article seems to be from 2016.
I have never been more tempted to check the NSFW box, but I’ll leave it open for now unless a mod complains. :-D
In short: microsoft was afraid of losing devs to linux due to an increase in linux servers.
How does this help though? If anything they would’ve helped themselves by porting more Linux commands to work natively in Windows. This move makes it easier for Windows admins and devs to switch to Linux. With the latest horrible moves in the Windows desktop space I can’t believe they’re trying to become the “RedHat of Windows”.
- Embrace
- Extend
- Extinguish
It’s been the Microsoft Business plan since practically the beginning.
If your os is windows and use ps, you can use ps on your linux vms as well. It prevents that you have to learn power and bourne. Such that it feels a bit more integrated. If you couldn’t use ps, you had to use both shells which may lead to a migration to linux
No one in there right mind uses Powershell on Linux
They like Linux servers since they make boatloads of money from Azure.
What they are scared of are Linux desktops and Macs. Windows is losing market share and Microsoft is to big to actual know why.
“Why is everyone going to linux when we are shoving copilot into fucking notepad.exe??”
It became untenable well before that for certain people. It’s all stuff that can be changed or disabled but the Start Menu in Windows 10 with the tiles, and its default search on Bing was infuriating. I do tech support and some clients just don’t bother to deactivate it. There is also the whole thing about Microsoft removing parts of the old Control Panel and its utilities.
But another aspect of why they may also be losing market is how bad they have been with other architectures, like ARM. Windows for ARM seems to be lacking a lot. Even though they have been slowly getting better with emulation, they are still very much behind macOS and Linux. And I’m just a level 1 tech, but it seems like ARM devices and other low power architectures will slowly replace the old home desktops. They may have made a big mistake there.
But they still hold the corporate world and governments by the balls so, it’s gonna be interesting to see.
I mean. For me it was the constant forced updates, the adversarial secret config options that may or may not be misdirecting lies that do nothing, constantly forcing edge install, every (forced) update causing worse performance and making the ui shittier, trying to shove one drive down your throat so they can harvest that sweet personal data, forced online accounts, etc.
I don’t want to fight my software being actively designed to do what some third party wants it to do. I rather it break for technical reasons rather than political ones.
Long ago I tried a cygwin based openssh server in Windows. Permissions were a real issue.
Powershell is annoyingly good though.
there are other shells that have all the nice powershell things without the weird stuff (at least for not windows people), like nushell
although I wouldn’t be surprised if powershell was the thing that started the trend of better shells
I wouldn’t go that far
As much as I hate windows powershell is actually decent.
The problem is that on Linux it competes with bash and dozens of way better terminals.
I’ve been a Linux sysadmin for decades and Windows for the year 8 years or so. I started using Windows with an air of contempt, and still do. I hate myself for saying this, but Powershell is better than bash. Bash is very limited if you consider only bash. For bash to be useful you need the entire GNU suite with grep, cut, awk etc.
But that’s almost never how a system is configured. The entire point is that bash, zsh, fish etc. can make use of those utilities. You don’t need bash trying to reinvent everything. You don’t want that. That’s why changing shells is generally painless and a strength, not a weakness.
That’s like saying that your car is very limited because you need cylinders, spark plugs, oil filters…
Well yeah, you do and typically that comes with the car, just like grep comes with bash
Yes, that’s the point of the shell. It’s the glue for all the little tools.
So you’re saying Powershell doesn’t uphold Unix Philosophy and thus shouldn’t be used?
PowerShell actually does uphold the Linux philosophy pretty well. Most functions are in modules that can be imported, disabled or swapped out as appropriate.
PS looking good
Slow as shit though.
mind telling me why?
i thought it’s just another terminal.
I can maybe chime in since I’ve used both. Basic operations like if statements, arithmetic and loops are a lot closer to what you’d expect on PS. The barrier to programming in bash vs PS is IMO a bit higher because bash heavily uses symbols for everything. This does make PS way more verbose but more easy to wrap your head around it when unfamiliar with the syntax.
I prefer bash but for anything bigger than 5 lines I prefer proper scripting language like python or js and making an alias for “node path/to/js/script.js” and using execSync(“program param1 param2”) to run shell commands.
Long story short, I prefer bash because it’s built in and I know it better than PS, I expect PS guys to feel the same way.