this post was submitted on 29 May 2025
135 points (97.2% liked)

Linux

7503 readers
210 users here now

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

Also check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] truthfultemporarily@feddit.org 30 points 5 days ago (4 children)

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.

[–] bleistift2@sopuli.xyz 27 points 5 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?

[–] morbidcactus@lemmy.ca 13 points 4 days ago* (last edited 4 days ago) (1 children)

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.

[–] Irelephant@lemm.ee 2 points 4 days ago

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

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.

[–] Irelephant@lemm.ee -2 points 5 days ago

Maybe you're a bit more used to the linux stuff then.

https://lemm.ee/comment/20786033 -- I think powershell's syntax is far better than bash's. It feels more modern.