What is your favourite shell to use

Tekkip20@lemmy.world to Linux@lemmy.ml – 128 points –

What's your favourite to use? Mine is Fish due to its ease of use and user friendly approach.

Bash is the pepperoni of shell tools being reliable in every field no matter what but I've moved to Fish as I wanted to try something different.

So what's your shell of choice?

116

Bash

Not because it's the best or even my favourite. Just because I create so many ephemeral VMs and containers that code switching isn't worth it for me.

Exactly, I choose the one that's always there on every machine I access!

Seconded. Having an awesome Fish setup doesn't help at all when you're constantly having to shell into other machines unless you somehow keep your dotfiles synced, and that sounds like a total hassle.

I'd rather my muscle memory be optimized for the standard setup.

I use Ansible playbooks to keep my config in sync. It's great but there is a bit of a learning curve. Makes it easy to deploy config changes.

Definitely fish. It does everything i need out of the box. To achieve the same with zsh, i needed a dozen plugins on top of a plugin manager. Here, in satisfied with just Starship as custom prompt.

That said, i’ve been trying nushell recently. Don’t really think it’s for me, but it is pretty interesting

Uh. Whatever my distro comes with per default.

Honestly? Bash. I tried a bunch a few years back and eventually settled back on bash.

Fish was really nice in a lot of ways, but the incompatibilities with normal POSIX workflows threw me off regularly. The tradeoff ended up with me moving off of it.

I liked the extensibility of zsh, except that I found it would get slow with only a few bits from ohmyzsh installed. My terminal did cool things but too slowly for me to find it acceptable.

Dash was the opposite, too feature light for me to be able to use efficiently. It didn't even have tab completion. I suffered that week.

Bash sits in a middle ground of usability, performance, and extensibility that just works for me. It has enough features to work well out of the box, I can add enough in my bashrc to ease some workflows for myself, and it's basically instantaneous when I open a terminal or run simple commands.

while I still use ohmyzsh, a lot of it's opponents make it's slowness one of its complaints. You don't need ohmyzsh to have fancy things, it's just makes setting it all up a little easier.

I know I'm a heretic but I'm a huge powershell fan. Once you work with an object-oriented shell you'll wonder why you've dealt with parsing text for so long. Works great on Linux, MacOS and Windows, it's open source, reads and writes csv, json and xml natively, native web and rest service support, built-in support for remote computing and parallel processing and extensive libraries for just about anything you can think of. It takes a little getting used to but it's worth it.

TBH, I use Powershell on my Windows install, and they've made some good improvements over the years. I forget that it also works on Linux.

Shame v1.0 ships with new installations, and you have to manually go out and install the latest versions to get the benefits. Dunno why MS doesn't just automatically update it with everything else.

Version 2 came with Windows 7. Version 5 comes with Windows 10 (and I think 11). V7 is the latest but being cross-platform doesn't come with some of the Windows-specific modules built into v5.

V1 never actually shipped with any version of Windows

Windows 7 shipped with V2, 8 with V3, 8.1 with v4, and 10 with v5 and later 5.1.

5.1 is the latest (and last) version of Windows PowerShell.

All versions after that are just PowerShell (or PowerShell Core for version 6)

Not sure why they don't bundle it by default, but starting at v7.2 it can be updated by Windows update

I use powershell by default on windows and I prefer it for scripting any day of the week vs. shell scripts. It's not the fastest but you can always plug in .net to your scripts to dramatically improve performance. Sure, I could write the script in rust or whatever to make it even faster, but that's way more work than I need for the lifespan of the script.

Even on Windows I try to avoid Powershell. I use bash through GitBash there, too. But, I don't mind using Powershell for work, because some workflows are already implemented in ps1-scripts.

bash is so ubiquitous that I never considered anything else.

Don't try zsh, because you won't be able to go back to bash after that 😉

Fish for an interactive shell, and I'll often drop back to bash for writing a script. I can never remember how to do basic program flow in fish. Bash scripting is not great, but you can always find an example to remind you of how it goes.

Bash is fine. Zsh on Macs is fine too. I can’t stress how useful it is to learn busybox if you end up with a shell on an embedded device.

All these crazy shells people talk about are kinda like race car controls. I’m not driving a race car, I’m driving a box truck with three on the tree.

My job is working with a ton of servers over ssh. Bash is the most convenient balance between features and not needing to do any setup.

Bash or ZSH. Whatever is default.

nushell is excellent for dealing with structured data. it’s also great as a scripting language.

Soft shell tacos are my favorite. Hard shell is ok but there's nothing like a double wrapped soft taco.

Oh and I just use bash.

Fish, less config and super easy to set things like path, colors, and the support for dev environments and tooling is better than it was. Used to be a Zsh user, but moved since I distro hop so dang much. Less time to get going.

Former zsh user. fish works for me.
For scripts I use bash tho.

I've explained my choice for zsh here

Nicely configured it's so convenient that I spend most of my time in the terminal and don't even use a file explorer anymore. It can also be expanded with some plugins for specific use-cases.

Your website's theme is very pleasant to look at and also serves good for a blog since everything is easy to read. Good job, if you were the one who made it

Thank you very much for your feedback. I've spent quite some time trying to create a minimalist and efficient theme. Very glad to hear that I met this goal.

I really like fish because it has excellent contextual autocomplete based on the folder you're in. I haven't used any other shell that was as good at it.

Eshell because it is consistent cross platform and I switch often for work/etc. Sometimes I’ll use bash when I really want a native shell.

I used fish before eshell and I really like it, the auto complete is nice, but eshell has autocomplete and since aliases and other configurations are in my emacs config, they sync cross platform too.

I really like nushell, which has more of a feel and ergonomics of a modern programming language without the idiosyncrasies of traditional shells (so it's obviously not POSIX shell compatible).

One major downside is that it's not yet stable, so breaking changes between releases are expected.

Bash, not because its my favourite but because it's nearly ubiquitous. I don't want to have to think about which shell I'm using.

POSIX shell. No, seriously. Works everywhere.

After that Python for usability.

Fish shell. I switched to fish ages ago, back when I didn't know much bash scripting. Now I am just so used to it that I don't wanna switch back. Plus it just works.

Zsh, because unlike Bash using arrays in Zsh doesn't make me want to perform percussive maintenance on the nearest Von-Neumann machine

I always figured that Ksh / POSIX / Bash shell arrays are kept as they are because anyone with a serious need of arrays ought to be using something better than a scripting language.

Not necessarily.
They're a basic data structure used everywhere, most notably with command arguments ( $@ ) and can make shell scripts a viable option for many simple tasks if their syntax makes sense and you don't have to wonder how their expansion works every time you see one being used.

An analogy:

My Swiss Army knife has a screwdriver on it. It's nice to have, and I even used it recently.

It juts out perpendicular to the middle of the knife's body though, making a literal " |- " shape, so for many applications it's too awkward for the job.

I also have a more traditional screwdriver. As and when I come to build a new PC, I don't think I'll be using the one on the knife.

Following the analogy, what if the screwdriver part was bent by 30° and you had to awkwardly turn the tool while keeping it tilted - but there's also a spring mechanism that attempts to retract the screwdriver you push too hard against the screw?
(all of that for historical reasons, of course)
((or even to discourage you from using the tool?))

OpenBSD's default public domain kornshell fork on OpenBSD, oksh (portable OpenBSD ksh clone) on Linux/MacOS/Other Unix. It has far fewer extensions than something like Bash (which I consider a positive) while being much faster (tested with hyperfine), and the extensions it does have are all useful (arrays, coprocesses, select, .* not expanding to . or .., pattern blocks, suspending of the whole shell).

Favorite would be a highly customized zsh.

fizsh (not fish) is what I actually end up using, as I can't be bothered to copy that config around and retune it for each machine. Gives me the syntactic sugar of zsh with common default options on by default, an OK default prompt, and doesn't break POSIX assumptions like fish. Also Installs quickly from the package manager without needing to run through the zsh setup each time - unlike oh-my-zsh. And if I still need customization, all the zsh options are still there.

Xonsh. For basic use (running CLI programs with arguments) it works like any other shell, and for other uses it has nice Python syntax (and libraries!). For example, I like not needing a separate calculator program, as I can do maths directly in the shell with an intuitive syntax.

Slowly trying to learn sh while using mostly bash. Convenience is nice and all, but when I encounter something like OpenWRT or Android, I don't like the feeling of speaking a foreign language. Maybe if I can get super familiar with sh, then I might explore prettier or more convenient options, but I really want to know how to deal with the most universal shell.

This is a good approach. I've always found it beneficial to learn "the standard things" than relying on a customized setup.

I've seen some people absolutely lost when they login to a system without 500 custom aliases on it..

I've recently migrated to nushell, I don't straight up recommend it because it's not POSIX compliant, so unless you're already familiar with some other she'll I would not use it.

That being said, it's an awesome shell if you deal with structured data constantly, and that's something I do quite often so for me it's a great tool.

Just looking at it briefly it looks a lot like PowerShell, any reason to use it over PowerShell?

Never used PowerShell, so I didn't know that it was available for Linux nor open source, since from a quick search both of them seem to be true I guess there's no real reason since both are described very similarly.

I'll probably give it a spin anyway, might be I find some benefit and it looks like an interesting project. Being Rust based instead of C# .NET based could theoretically make it a lot faster (though I've not really had an issue of speed in PowerShell)

It's indeed a lot like powershell, but I found it to be much less painful to use for everyday tasks. I can't really put my finger on it, but powershell always felt very clunky and unpredictable to use. With Nushell, I can write pipelines that usually have the desired behavior on the first try. Also, its more convenient in so many different aspects that I can't go back anymore.

The biggest downside is, that it hasn't had a stable release yet. While I haven't encountered any bugs yet, there are often breaking changes with new releases that may break your scripts.

Yeah, PowerShell does do things that don't exactly make sense without having some understanding of the underlying dotnet and what the components actually do

Like I said, never used PowerShell, but yeah, nushell pipes are very intuitive, I've been only using it for a short time but was already able to do very interesting pipes with minor effort

Fish for interactive shell. “It depends” for scripting, but usually ends up Bash since it is the NixOS default.

Bash. By default it might seem less featureful than zsh.. but bash is a lot more powerful and extensible than some give it credit for. It might be more complex to set it up the way you like it, but once you do it, that configuration can be ported over wherever bash exists (ie. almost everywhere).

Bash, zshell, BusyBox....you don't really need anything else

zsh because I've been using it since college and I don't like change

PowerShell, because of autocomplete and shift+arrows select.

I often end up in ps because I'm more familiar with it. But only if I have to do some scripting or so.

I have been enjoying fish a lot over the last few months, but I generally try to use Bash, it makes cross-*NIX administration that much easier.

zsh with grml config because I'm too lazy to make my own config.

POSIX on servers, thinking of switching to POSIX on desktop but that's a bit awkward

PowerShell, with zsh being a close second

Feeling risky today, eh? Mind sharing the reasoning behind your extravagant choice?

Not sure what's extravagant about it... Fully object oriented pipeline in a scripting language built on and with access to the .NET type class system is insanely powerful. Having to manipulate and parse string output to extract data from command results in other shells just feels very cumbersome and antiquated, and relies on the text output to remain consistent to not break

PowerShell, it doesn't matter if more or less data is returned, as long as the properties you're using stay the same your script will not break

Filtering is super easy

The Verb-Noun cmdlet naming convention gets a lot of (undeserved) hate, but it makes command discovery way easier. Especially when you learn that there's a list of approved verbs with defined meanings, and cmdlets with matching nouns tend to work together.

It actually follows the Unix philosophy of each cmdlet doing one thing (though sometimes a cmdlet winds up getting overloaded, but more often than not that's a community or privately written cmdlet)

It's easily powerful enough to write programs with (and I have)

And it works well with C#, and if you know some C#, PowerShell's eccentricities start to make way more sense

Also, I mainly manage Windows servers for work running in an AD domain, so it's absolutely the language of choice for that, but I've been using it for probably close to 14 years now and I can basically write it as easily as English at this point

I have customized ZSH to be very similar to Fish

At the moment I'm using zsh with powerlevel10k. But powerlevel10k is not really supported anymore, and seems to be basically on life support. While it still works for now, I have been thinking of switching over to fish. But the lack of posix compatibility is holding me back a bit.

Powershell, but heavily customized.

Why the downvotes? Ps is pretty good and it works well on Linux too.

xterm, because shortcut keys do what they are supposed to.

Edit:

Bash because it's default.

xterm is a terminal emulator, not a shell. Anything that produces a terminal-compatible text stream can be started as the first program.

e.g. xterm -e nano, assuming you have the nano editor installed, has no instance of a traditional shell (e.g. bash, zsh) running between the xterm and the editor, but the editor still works.

You could argue that makes the editor itself a shell of sorts, because it's interactive and you can do things with it, but it's still not the xterm that inherits that title.

IDK if federations doesn't work, I already wrote to another response that I use Bash.
Since the Amiga in the 80's I considered CLI windows and Shell as the same thing,because they kind of were on the Amiga, as there was only 1 shell, and a CLI window was also called Shell. But that was obviously a misunderstanding I just never got quite rid of.

While fish is easy to set up, I can't even be arsed to do that most times, so bash ends up being the one I use most.

I used zsh, urxvt and konsole. I do prefer zsh. Urxvt is nice too.

I think you're conflating shells and terminals.

I said I prefer zsh. I used terminals like urxvt when I used window managers. Urxvt + zsh works fine. On kde I didn't mind using zsh + konsole. Hope that clears up.

I don't really rate zsh personally. I find the additional features/syntactic sugar it adds are a poor tradeoff for lower portability. I also end up changing the settings in my zshrc to make it behave more like bash.