Or any other alternate shells that aren’t bash?
The idea of someone using powershell when you are on Linux is a form of self harm and you need to reach out as its clearly a cry for help.
Honest question: why?
Why not? It seems like a well supported shell on windows that isn’t terrible.
bash is also well supported in Windows via WSL
Development. Azure especially.
Because I have to admin Windows boxes and M365. There are PS modules for lots of different MS things.
Why do you care why OP asks if people use something?
I mean what’s the practical purpose?
The practical purpose of asking is to get a feel for how many people use it.
Less tongue in cheek though, it sounds like you have the same questions as OP. If you’re curious what might be the practical purpose, why not ask people who use it why they do instead of berating OP for asking if anyone uses it?
Well by that logic, it’s a way for Windows users to not learn the native tooling available, but not skip any steps. It doesn’t make any sense.
Learning Powershell in a Linux environment is going to just absolutely be a crutch and fuck up your ability to interact with other Linux systems that don’t share your particular environment.
As someone who used bash on Windows through MSYS, I don’t see the issue. It was different, not inferior, to cmd and PowerShell. If someone wants to use PowerShell on Linux why be such a condescending jerk about it? Sometimes people just wanna try things for the fun of trying new things.
exchange online shell
If you run VMware, you can use PowerCLI to interact with your vSphere servers, and PowerCLI requires PowerShell and uses similar syntax. I haven’t tried it on Linux yet, but I would assume that that might be a valid use case.
vSphere has SSH access. This isn’t a reason to use PSH on Linux.
It’s been a while for me and i can’t try things out atm, but i think vSphere SSH access is only for managing the appliance itself, not objects like VMs in a vSphere cluster. For that, you would have to use the Python SDK or PowerCLI.
i’m a big
nushell
fan.i was once sitting where you are. when PowerShell was released on Linux i thought about switching and read the manual. i really liked some of the philosophy:
- descriptive names for commands.
cat
andls
have canonical short names to save disk space on the systems they were created for. this is no longer a constraint and aliasing a longer command name is better than “git gud n00b” when it comes to discoverability. - structured data. “everything is a string” is great when programs play nice. it breaks apart when programs prefer human readable output or worse don’t provide structured output, like
—format=json
or whatever. - modern control flow semantics. yes, pipes are great, let’s keep those, but why do i have to rtfm every time i want to bang out a simple script with an if-else control flow?
i looked around at a few solutions.
xonsh
uses Python.eshell
is integrated into emacs and uses Elisp. i briefly tried to hack something together using Kotlin Script. and yeah, i tried PowerShell.i settled on
nushell
not just because it fulfilled the above requirements, but also:- simple data types. string, number, list, record, and table are about the only types you deal with.
- wide support for structured data. JSON, YAML, TOML, CSV, etc have parsers built in.
jq
and other such tools are made irrelevant because you just load it intonushell
query with a unified DSL using common syntax likeselect
andwhere
.
honestly, these are the killer features. there are so many more. context aware autocomplete, modules and overlays, super easy custom completions, extension functions (one of my favorites is
git remote open
), cross platform (if you’re forced to use Windows), plugins, and i can contribute since i do Rust development for work.give PowerShell a shot, but i think
nushell
is the happy mediumFinally! Nushell is awesome. The infrequent deprecations are a bit annoying, but I prefer them to having a bad program go 1.0
cat
andls
have canonical short names to save disk space on the systems they were created for.I thought it was to save on keystrokes due to slow transmission speeds.
yeah overall bandwidth was probably a consideration
- descriptive names for commands.
I use fish, mostly because it is the default on CachyOS
At work I use powershell to ssh into Linux boxes fairly regularly.
i ws forced to do it recently and noticed that they enforce usage of black terminal, like it is in the command prompt in windows.
it was a pain in the ass to keep switch colors just to touch that one powershell module and my first priority to replacing with with a python equivalent. they still think that the powershell module is being used, but it’s no longer capable of working in this environment and they’re going to have to spend $$$ to make it useable because i forsee LOT of difficulty and delays in bringing it up to spec.
Nope, I’ve tried it before but I prefer the muscle memory of bash/zsh.
I’ll use it on Windows though.
Basically no one is using powershell on Linux. zsh is popular and i’m using fish.
Fish is the cachyos default, I used oh my zsh too, I honestly cant tell a difference as a non dev end user
I like autocompetion/suggestions
I tried fish before switching to zsh because it has much better compatibility with bash, and I think bash/zsh handles a lot of things like aliases way better. I’m also on CachyOS and the default zsh config with ohmyzsh and powerline10k it comes with is great.
I use it for some things. It’s good for file batch processing, for example. I could probably do those things in python but I use C# and powershell at work so I know .net better.
It is not always Bash. Zsh comes as a default with some Arch based distros like Manjaro (xfce) and Garuda, plus Kali of course. But what is the point to use PowerShell in Linux? … Azure, Exchange or Windows servers or something else I don’t get?
My producer and I personally use Bash. We tried zsh, but that didn’t treat us very well. Fish is actually pretty nice, though.
I use PowerShell on Linux for work stuff. We maintain a set of Azure deployment scripts that were originally developed on PS 4 and 5 for Classic Azure. They’ve been migrated to AzureRM and now PS Core and Az. The scripts are now fully cross-platform.
We even use some PS remoting over SSH for remotely deploying stuff on Linux VMs where we run some bash commands for configuration.
I started with bash scripting years ago and never really used PS for Windows or exchange server admin. Just in the last decade for Azure stuff.
Sounds weird and horrible but it’s fine.
Bash is still home
only for extraordinarily cursed situations where games need it in wine/proton
I tried to use it for admin in a Windows environment, but half the modules I needed wouldn’t work in Linux which made it pretty much useless.