this post was submitted on 04 Aug 2025
68 points (94.7% liked)

Linux

57017 readers
674 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

Or any other alternate shells that aren't bash?

top 50 comments
sorted by: hot top controversial new old
[–] golden_zealot@lemmy.ml 3 points 7 hours ago* (last edited 7 hours ago)

I've used powershell in previous jobs and if you learn it really well I cannot deny it is super powerful.

For a college project, a friend of mine somehow made a hexadecimal file dumper with it, with formatting and everything (think like what you would see in wireshark) in one, reasonably long, line of powershell.

However I'm just not a big fan of it personally for syntactical reasons (even with the syntax being super logical) and much prefer bash, or other unix-like native shells. I've been thinking about taking zsh for a spin recently to see what it's like.

[–] ziviz@lemmy.sdf.org 4 points 9 hours ago

I use powershell for some scripting. I've been using .net/powershell forever and I know it better than python. If bash can't handle it in a few lines, and I don't have to use python, I'll go powershell.

At work I use powershell to ssh into Linux boxes fairly regularly.

[–] jodanlime@midwest.social 6 points 18 hours ago

Only when I'm doing MS shit for work. Otherwise I find it kind of a pain. I get that some of it's ideas are nice, but functionally it doesn't actually do anything for me on unixy systems that bash doesn't so I don't. I'm not going to install it on all my servers so using it for scripting doesn't make sense and I do more Linux admin than MS.

[–] somerandomperson@lemmy.dbzer0.com 7 points 19 hours ago (1 children)

I use both fish and zsh

somehow

[–] sxan@midwest.social 1 points 15 hours ago (1 children)

That's... a big gap. I think I'd just be confused all the time if I had to switch between them.

I mean, missing commands say that it's zsh but everything else says that it's fish.

[–] ArsonButCute@lemmy.dbzer0.com 5 points 18 hours ago* (last edited 18 hours ago) (1 children)

I used to use fish but I'm learning Unix right now and am trying to use only defaults so I can learn freebsd the way it exists on a dvd, so right now I've been using the Bourne shell

[–] LeFantome@programming.dev 3 points 6 hours ago (1 children)

If you are using FreeBSD, you are probably using the Almquist Shell.

https://en.m.wikipedia.org/wiki/Almquist_shell

BSD has not used Bourne since the 90’s. Bash is of course the “Bourne Again Shell”.

For Linux fans, “dash” is the (Debian Almquist Shell). It is the Linux version of the BSD shell. Dash is the default /usr/bin/sh in Debian and Ubuntu I think. So, pretty close to the same shell as FreeBSD.

[–] ArsonButCute@lemmy.dbzer0.com 2 points 6 hours ago

That's the one!

SO much of the documentation I've seen refers to the Bourne shell I just assumed thats what I was using!

[–] nimpnin@sopuli.xyz 17 points 1 day ago (1 children)
[–] Electricd@lemmybefree.net 10 points 1 day ago (1 children)
[–] sxan@midwest.social 4 points 15 hours ago

Not that kind of "use!"

[–] mactan@lemmy.ml 4 points 20 hours ago

only for extraordinarily cursed situations where games need it in wine/proton

[–] hobbsc@lemmy.sdf.org 2 points 17 hours ago

only when dealing with azure for work. otherwise bash/python work just fine and have for me for the last 30 odd years.

[–] lordnikon@lemmy.world 74 points 1 day ago

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.

[–] beeng@discuss.tchncs.de 8 points 1 day ago (1 children)

At work we use it sometimes on Linux because we maintain a script that needs to work on multiple platforms, ps1 did that in this usecase better.

Came down to ps1 on Linux was better and more predictable than bash on windows.

Sadly.

[–] Frederic@beehaw.org 2 points 21 hours ago

Same, only time we used it is when we needed a script that was running in Windows and Linux, easier to maintain one script that 2 in 2 languages

[–] Andrzej3K@hexbear.net 4 points 22 hours ago

Zsh is nice, particularly with a couple of plugins

[–] Heavybell@lemmy.world 5 points 1 day ago

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.

[–] Sina@beehaw.org 5 points 1 day ago

Basically no one is using powershell on Linux. zsh is popular and i'm using fish.

[–] just_another_person@lemmy.world 40 points 1 day ago (27 children)
[–] johannes@lemmy.jhjacobs.nl 19 points 1 day ago (2 children)

Because, as someone who dislikes MS as much as possible, Powershell is one of the few things they done right :) And when you manage mostly Windows servers and a few Linux servers, why not choose a solution that works on both platforms? And yes, perl, python, ruby, they all work on Windows too, but its just not comparable to powershell on Windows.

So i can understand why someone asks this question :)

Personally, i keep them both seperated, powershell on Windows, bash on Linux. But i can understand why someone might choose to go “powershell all the way” :)

[–] Badabinski@kbin.earth 6 points 20 hours ago

Powershell is a better language but is absolutely dogshit for interactive use IME. It's SO wordy and the excessive use of camelCase is annoying and I yearn for simple GNU coreutils every time I touch it. Like, give me tail -f please, why does cat also have a -Wait option or whatever the fuck

[–] trey_a_12@lemmy.world 1 points 17 hours ago

Understandable sentiments. I’m a MS Edge user, for instance, and despite slowly switching almost all my other services, MS Edge just gets it all right. Brave’s featureset is basically a lesser version, and Firefox is getting better, but Microsoft (of all companies) genuinely made a great browser.

load more comments (26 replies)
[–] Doorknob@lemmy.world 3 points 1 day ago

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.

[–] chrash0@lemmy.world 27 points 1 day ago (5 children)

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 and ls 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 into nushell query with a unified DSL using common syntax like select and where.

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 medium

[–] zarkanian@sh.itjust.works 2 points 9 hours ago (1 children)

cat and ls 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.

[–] chrash0@lemmy.world 1 points 9 hours ago

yeah overall bandwidth was probably a consideration

[–] flying_sheep@lemmy.ml 2 points 18 hours ago

Finally! Nushell is awesome. The infrequent deprecations are a bit annoying, but I prefer them to having a bad program go 1.0

load more comments (3 replies)
[–] cupcakezealot@piefed.blahaj.zone 20 points 1 day ago (1 children)
load more comments (1 replies)

I use fish, I had to learn some new syntax and modify some functions since it's not POSIX-compliant, but it was pretty painless.

[–] data1701d@startrek.website 8 points 1 day ago

No.

I usually just use Bash; there’s a certain level of complexity where it begins to be more reasonable to just use Python.

[–] Tapionpoika@lemmy.ml 5 points 1 day ago

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?

[–] stiltonfondu@sh.itjust.works 4 points 1 day ago

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

[–] mohab@piefed.social 8 points 1 day ago

I use Linux to get away from PowerShell 😂 I did try zsh though, it was nice, maybe give it a shot.

[–] exu@feditown.com 11 points 1 day ago

I use fish, but only interactively. Scripts are either in bash or Python depending om what I need.

[–] disco@lemdro.id 1 points 23 hours ago (3 children)

What's wrong with bash? Something missing or not to your liking? It can be configured

[–] zarkanian@sh.itjust.works 1 points 10 hours ago

Maybe it can, but with fish, it does what I want right out of the box, and I don't have to spend time configuring it.

[–] Euphoma@lemmy.ml 3 points 20 hours ago (1 children)

Manipulating data in bash is bad.

[–] martinb@lemmy.sdf.org 2 points 18 hours ago (1 children)

Base 64 encode all your array variables then decode them when needed

[–] Euphoma@lemmy.ml 1 points 16 hours ago
[–] flying_sheep@lemmy.ml 2 points 18 hours ago

It has atrocious error handling, and there's no reasons why arrays should only be 1D.

load more comments
view more: next ›