zsh > bash
I have never really ever used bash and thought, "Man, I wish my shell was better . . . ". Using ctrl+r to recall past commands, using sudo !! to fix missing permissions and writing small bash scripts all work very well.
That being said, if you use anything else, and you like it, I’m happy for you, but I do wonder, what leads people to other shells? What problems do they have with bash?
To me, it genuinely makes a huge difference that I don’t have to manually press Ctrl+R for history search. Because 9 times out of 10, I accept a history suggestion from Fish where I did not think about whether it would be in my history.
This includes really mundane commands, like
cd some/deeply/nested/path/. You would not believe, how often I want tocdinto the same directory.
But I’ve also had it where I started typing a complicateddocker runcommand and Fish suggests the exact command I want to write, because I apparently I already ran that exact command months ago and simply forgot.I used bash for 20 years and, while I obviously knew that there were alternatives, it never seemed necessary to switch. Tried fish on a whim a few months ago and I will never go back.
i use bash but i also use atuin which makes shell history so much neater. that’s about the only convenience i need in a terminal shell.
using friend’s computer
open terminal
it’s actually windows
It’s actually windows
It’s actually not Unix-like.
I don’t mind /bin/zsh.
Now Oh My Zsh! on the other hand can die in a hole.
Linux noob here. Can you explain please why I‘d use a different terminal than what my distro provides (bash)?
I would really recommend you try fish.
It has a lot of nice autocomplete features and handles functions much better than bash. It has a very sensible autoconfig so you can just install and try it.
Zsh can be configured in quite a lot of ways. It’s default config is quite similar to bash.
What does it autocomplete? Filenames? Bash can do that too, right? I just hit the tab key and it’s written there.
And with functions you mean in scripts? How does it handle functions better?
Autocompletions in fish also take history into account, which saves you a lot of typing in the long run.
Fish shell script is much more sensibly constructed than bash so it’s just much easier to write a script in fish.
Features and default settings, but its really just about preference. They are all good at what they do.
Also im only saying this because it confused me for so long, but shell and terminal are different parts of the same thing. Bash is your shell, its the backend that runs everything you type into your terminal. My computer for example uses my kitty terminal which communicates in bash. You can change both the shell and terminal. Zsh is another shell, so it would change the “shell language” you use to communicate with your terminal.
There can be a ton of reasons, albeit I personally also just stick with default (for me zsh). In typical linux user fashion I also must tell you that bash and zsh are shells, not terminals.
The two main reasons you’d choose a particular shell is because you prefer it’s configurability or syntax. Zsh has a bunch of features that you can enable and you can configure it to behave basically however you want, like adding spelling correction or multiline editing, but it’s defaults absolutely suck unless your distro comes with a sensible config. Fish, which another guy here’s raved about, goes in basically the opposite direction and is really nice to use out of the box (I haven’t used it though). I hear it’s technically not a valid
/bin/shsubstitute like zsh or bash because of syntactic differences, but that’d be a whole other rabbit hole if true.One other reason can be performance concerns because bash is pretty slow when treated as a programming language, but I’d argue you shouldn’t organize your workflow so that bash is a performance bottleneck.
I use whatever my OS came with.
I never tried anything other than bash tbh. Not sure if i should. I never really looked into what i might be missing out on with a different shell. Bash just works so i never felt like messing around with it.
fish is worth trying. saves alot of typing
This is bait.
And I’m ready to
fishI jumped from bash to fish because cachy os has it as default. I kinda don’t like it, it’s a little too fancy, but it’s not bad enough for me to bother switching the default to bash. So I’m using it. Still not quite liking it but maybe it’s growing on me.
Currently using
zshbut I installedfishyesterday to try it out because I’m thinking of switching. All thezshplugins I have are basically just replicating whatfishhas by default anyway and fish might do it better.Plus, look at your name!
Just whatever you do, don’t
ln -s /bin/fish /bin/shWell a shell script that can only run with Nash should include !# bin bash in the header.
It still gives you basically no advantage compared to just making your terminal emulator launch
fishby default. And well, it does give you the major disadvantage that scripts without shebang will fail.You assume everyone writes shebangs correctly. Also ideally you’d use
I see.
Proceed to write
what’s fish got? I’m liking zsh here but am always open to a distraction instead of getting work done. :)
Lovely OOTB defaults. I basically change nothing except the theme.
Autocomplete, git context, etc. The QOL stuff you’d expect.
does fish have fuzzy reverse hostory search?
Looks like that is indeed the default option
oh interesting. will give it a shot. basically sounds like zsh plus omz?
The main differentiator of fish over everything else is it prioritizes intuitive behavior over backwards compatibility.
Zsh is to bash as c++ is to c. Most bash scripts and habits will work in zsh, but zsh is just more convenient and has more options. Fish is intentionally different.
Do I wish fish had existed instead of bash so we had a nicer terminal experience? On the whole, yes. But I also couldn’t be bothered to learn another shell where most of the instructions online won’t be able to help you, and I ended up sticking with zsh.
This is a good way of putting it. It’s essentially ZSH with Autosuggest/complete and a theming agent. At least visual-wise.
When you get into the scripting and the hot keys aspect of it, they reinvent the wheel and everything is different., Like for example ,!! and other bangs(I think that’s the right word?) like that are not valid on fish, And everything to do with variables is different from adding to your path to setting variables to creating functions. Also checking your error code is going to be different as well as it doesn’t follow the $x style inputs and doesn’t support IFS and globbing works differently.
TLDR; fish is nice, but If you use it unless you want to relearn an entire type of language, keep your scripts on bash or zsh
or if you wanna see the bigger differences fish has a dedicated bash transition page
thanks for the detail!!
Be aware that fish isn’t a POSIX-compatible shell enough, so you have to adjust syntax.
That isn’t incorrect, but it’s not as important as people make it out to be. Linux isn’t certified as POSIX-conformant either.
People are way too stuck on POSIX regarding Fish specifically, but in shell scripting, POSIX compliance boils down to “can it run a pure
shscript”. Bash is compliant. Zsh is partially compliant and needs to set an option to emulatesh. Fish uses a different syntax and is not compliant; if that is a problem, don’t executeshscripts in Fish.POSIX compliance for shell scripts was important in the 80s and 90s when the
#!directive wasn’t as commonly implemented and every script might be executed by the user’s$SHELLinstead. That is no longer the case as virtually every Unix-like system’s program loader supports#!.I use fish, but sometimes it acts weird. And lots of “just copy and past this command” kind of online solutions I have to put into bash.
My main irk is when I want to forward a ‘*’ to a program but have to escape it.
That’s why it’s a shell for the 90s and not the 80s
It’s a cool shell, I use it as a daily driver (though I’m keeping a close eye on elvish which syntactically is even further away from classic shell), but the comments read like fish is basically zsh. And while zsh is pretty close to bash, fish isn’t.
Yup, very similar! And quite customizable as well if you want to. But the focus is on having, by default, a friendly interactive shell.
I like that I can spin up a VM, install fish,
chshand I’m all set.
Fish is great if you can’t remember a specific command, or don’t want to type out long filenames/locations, but I dunno if I’d use it as the default.
I just type “fish” in the terminal if I ever run into a situation where I might get some use from it.
I used to do that, until I realized I never had a usecase for plain bash over fish
I have that occasionally when I want to copy a complex bash command from somewhere. But yeah, I can then just run
bash, run the command in there and thenexitback out of there.that’s what bass is for
Oh yay, more tribalism.
Yay? Everybody knows you should use paru! /s
lmfao beautifully executed
I…I don’t understand the meme? I have some Termux LXqT OS
Am I out of the loop? what’s wrong with zsh?
Classic linux tribalism. Use what you like and don’t get involved with these confrontational nerds.
I mean, there’s some things that became validly toxic due to their developers, example off the top of my head: Reiserfs
True, software can call you a slur.
It can when I write it.
Or kill your mail order Russian wife.
wat?
Inserts joke about it being weird that it happened twice
There doesn’t have to be tribalism, people just need to accept that systemd is a botnet
Unrelated to the topic: How did you make your username red?
I didn’t, depending on your client it might be how it signifies instance admins
Thx.
Same as systemd, PipeWire, Wayland, Flatpak… basically, it’s new therefore it is bad.
It’s permissively-licensed (as opposed to bash, which is GPLv3). Pushing zsh over bash is part of a larger effort by corporations to marginalize copyleft so they can more easily exploit Free Software at the users’ expense. Don’t fall for it!
fish, the main modern alternative to zsh + oh-my-zsh, is mostly GPLv2, and you can redistribute it and/or modify it under the terms of the GNU GPL as published by the Free Software Foundation.
It’s such a shame that, if zsh gains enough critical mass, all copies of its source code will be deleted from the universe and no-one will be able to use it without paying any more.
It’s such a shame that you can’t customize the version of zsh running on your Linux-based embedded device because it’s DRM’d to prevent the modified version from being installed.
…oh wait, that’s not sarcasm because it’s actually plausible.
Shit I didn’t know this was a problem. What devices are these? I’m assuming we’ve got a few in every home?
Cool.
And what, exactly, is the path from “pushing back on zsh” to “embedded device manufacturers can no longer lock down their devices?”
A plausible path is precedent and normalization, not zsh specifically.
If a widely used copyleft component (like a shell) starts being accepted as “OK to lock down” in consumer or embedded devices, manufacturers and courts get comfortable with the idea that user-modifiable software is optional rather than a right tied to distribution. Over time, that erodes enforcement of anti-tivoization principles and weakens the practical force of copyleft licenses across the stack.
Once that norm shifts, vendors can apply the same logic to kernels, drivers, bootloaders, and userland as a whole—at which point locked-down embedded devices stop being the exception and become the default, even when the software is nominally open source.
I don’t understand. It’s already ok to “lock down” devices, from the point of view of most consumers and the courts, regardless of the software license. Phones make it hard for you to flash new firmware onto them. That is still true with android and the open source components in its stack.
Using bsd licensed software in every day life cannot accelerate that because it has already happened, and I don’t see how it would be otherwise, because software licensing doesn’t protect against the kind of locking down you’re talking about.
Foss traditionalism im guessing.
It’s stinky and smelly and smells bad.
It makes people vomit.
I switched from bash to zsh a while ago, mostly just for shits and giggles. I really can’t see any reason to form a strong opinion on it one way or the other.
Bash is copyleft (GPLv3). Zsh is permissively-licensed.
Apple, for instance, switched from bash to zsh when the GPL version upgraded because they wanted to withhold those rights from their users.
Zsh should be considered harmful as a tool of corporate encroachment and subjugation of Free Software.
Calm down RMS, you’re going to have another episode.
His episodes are just him being right over and over and us refusing to listen
He is always right.
Except for that one time.
Well and also eating his own feet
Removed by mod
Removed by mod
Removed by mod
Removed by mod
If you wanna try something different, give nushell a try. It’s like magic to me.
I went from bash to fish to zsh. I can see why people would like having fish as a shell. but I hated scripting on it and if I’m going to be triggering a different shell for scripts anyway, I might as well skip the middleman, not re-invent the wheel and just use zsh with plug-ins that way I only have two shells installed instead of three. Adding the auto-complete plugin and a theme plugin for zsh gives most of fishes base functionality and design while making it so I don’t nerd to worry about compatibility.
Maybe someday when I’m less code oriented, I will re-look at fish, but I don’t see it happening in the foreseeable future.
I don’t have an opinion either but you could try using Starship on top of ZSH:
It’s supposedly lighter than OhMyZSH with the same features.
Starship is also available with other shells, and even Powershell which is nice because having the same tool everywhere is always better.
bait used to be believable
I use zsh and it’s fine, I use it with starship, zsh-syntax-highlighting and zsh-autosuggestions
You can do that with
fishtoo and it’s easier to do soYes, I replicated some features of fish in zsh because I liked some parts of fish but I didn’t like the different syntax (not that I’m too familiar with the shell, just familiar enough to get annoyed sometimes when using fish).
but but but easy to theme





















