135
submitted 2 days ago by [email protected] to c/[email protected]

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

top 50 comments
sorted by: hot top new old
[-] [email protected] 8 points 1 day ago

All I remember is the years of M$ using lawsuits and FOSS to try and kill Linux. Using anything from Windoze is like saying, yeah, but the Nazi built some good stuff too. M$ tried to murder our baby, and should never be forgiven nor trusted.

[-] [email protected] 43 points 2 days ago

In short: microsoft was afraid of losing devs to linux due to an increase in linux servers.

[-] [email protected] 10 points 2 days ago* (last edited 1 day ago)

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".

[-] [email protected] 8 points 1 day ago
  • Embrace
  • Extend
  • Extinguish

It's been the Microsoft Business plan since practically the beginning.

[-] [email protected] 8 points 2 days ago

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

[-] [email protected] 4 points 2 days ago

No one in there right mind uses Powershell on Linux

[-] [email protected] 3 points 2 days ago

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.

[-] [email protected] 5 points 1 day ago

"Why is everyone going to linux when we are shoving copilot into fucking notepad.exe??"

[-] [email protected] 1 points 1 day ago

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.

[-] [email protected] 3 points 1 day ago

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.

[-] [email protected] 39 points 2 days ago

Powershell is annoyingly good though.

[-] [email protected] 17 points 2 days ago
[-] [email protected] 12 points 2 days ago

As much as I hate windows powershell is actually decent.

[-] [email protected] 6 points 2 days ago

The problem is that on Linux it competes with bash and dozens of way better terminals.

[-] [email protected] 7 points 1 day ago

We're not talking terminals, though, are we? You can run pwsh in dozens of terminals. As a shell, it's... Very decent.

[-] [email protected] 6 points 2 days ago

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.

[-] [email protected] 15 points 1 day ago

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

[-] [email protected] 8 points 1 day ago

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.

[-] [email protected] 0 points 1 day ago

But on windows it makes sense to have the stuff built in, because those utilities are not on windows.

[-] [email protected] 5 points 1 day ago

Yes, that's the point of the shell. It's the glue for all the little tools.

[-] [email protected] 4 points 1 day ago

So you’re saying Powershell doesn’t uphold Unix Philosophy and thus shouldn’t be used?

[-] [email protected] 3 points 1 day ago

PowerShell actually does uphold the Linux philosophy pretty well. Most functions are in modules that can be imported, disabled or swapped out as appropriate.

[-] [email protected] 4 points 1 day ago

PS looking good

[-] [email protected] 2 points 2 days ago

I hate to say it, but powershell is better than bash.

[-] [email protected] 29 points 2 days ago

Can someone explain to me why? The outputs are objects and that is cool for scripts, but the fact that every small thing is its own cmdlet is super annoying. I can do everything in Linux if I know 10 commands. In PS I would always have to look up everything.

[-] [email protected] 2 points 1 day ago

Same here. I keep hearing that Powershell is so good, but I have to look up every little thing. It's all too specific and you can't remember it all.

[-] [email protected] 14 points 2 days ago* (last edited 2 days ago)

If I recall the Verb-Noun idea is supposed to make it clear what is happening, take a look through stuff like the approved verbs for defining cmdlets. There's aliases and stuff for sure for example I think ls is an aliases for Get-ChildItem in PowerShell.

It's supposed to make it so you don't necessarily need to look things up, need to do something to an item? Well you can Copy, Remove, Rename, Move etc, and while yeah that's a super basic example that you know the equivalent linux commands for, the concept is supposed to apply everywhere. Now, whether or not people follow the guidelines is probably another story.

I don't really hate shell scripting, feel like they all have their place, complex stuff though is nicer in straight PowerShell than bash IMO, but I'm fine using either.

[-] [email protected] 2 points 1 day ago

The aliases are good for the most part, but curl is an alias for Invoke-Webrequest, even though the two are incompatible.

[-] [email protected] 27 points 2 days ago

the fact that every small thing is its own cmdlet is super annoying. I can do everything in Linux if I know 10 commands

That sounds more like a clash of cultures than a real problem. In Linux you need to know 10 options and possibly subcommands for each command. Naturally the same concept has different flags, and the same flag has different meanings in different commands. Is that really better?

load more comments (1 replies)
[-] [email protected] 11 points 2 days ago

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

[-] [email protected] 1 points 1 day ago

TIL. Looks like I will be installing Nushell. This is neat. Especially how everything returns the final value.

load more comments (3 replies)
[-] [email protected] 13 points 2 days ago

I'll take your word for it. I could never wrap my head around PowerShell back when I still had a Windows install. Whenever I could, I would use either the DOS prompt or WSL/Ubuntu. I may not be great at Bash or DOS but at least I'm not having to resort to cargo culting to do anything. Probably a sign I'm getting old.

[-] [email protected] 1 points 1 day ago
[-] [email protected] 1 points 1 day ago

The blue powershell window is for me, but running powershell.exe in conhost, or windows terminal is fast enough.

[-] [email protected] 1 points 1 day ago

What do you mean? If you run powershell directly it opens up either in conhost or Windows Terminal, depending on whatever is your default, doesn't it? Unless you mean PowerShell ISE or whatever it's called.

[-] [email protected] 1 points 1 day ago

I mean running it directly shows up in the ugly blue window, and that's slower in my experience.

load more comments (25 replies)
[-] [email protected] 9 points 2 days ago

Long ago I tried a cygwin based openssh server in Windows. Permissions were a real issue.

load more comments (1 replies)
[-] [email protected] 4 points 2 days ago

I work on both Linux and windows machines for some software projects. It's nice to be able to write powershell helper scripts and have it work on both.

load more comments
view more: next ›
this post was submitted on 29 May 2025
135 points (97.2% liked)

Linux

7470 readers
434 users here now

A community for everything relating to the GNU/Linux operating system

Also check out:

Original icon base courtesy of [email protected] and The GIMP

founded 2 years ago
MODERATORS