this post was submitted on 31 Aug 2023
8 points (100.0% liked)

Linux

1259 readers
37 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 5 years ago
MODERATORS
8
Stop Using Bash (discuss.online)
submitted 1 year ago* (last edited 1 year ago) by MartinJezhyk@discuss.online to c/linux@lemmy.ml
 

  • Use Oil Shell if you want a faster and more modern version of Bash that's compatible with it and offers more modern oil language.
  • Use Zsh if you want better extendability and more plugins.
  • Use Fish if you want perfect out of the box configuration and a more modern (and less verbose for most cases) scripting language.
  • Use Dash/Ash if you want better speed and full POSIX compliance (no extension, no unimplemented features).
  • Use Yash if you want better autocomplete but still faster than Bash.
  • Use Xonsh if you want an awesome Python-based scripting experience and very nice autocomplete.
  • Use Elvish if you want a more modern scripting language.
  • Or use anything. Any shell will be better than Bash. Bash is slow, not POSIX compliant, and doesn't offer Zsh/Fish level autocomplete.
top 13 comments
sorted by: hot top controversial new old
[–] 20gramsWrench@lemmy.dbzer0.com 16 points 1 year ago (1 children)
[–] sederx@programming.dev 13 points 1 year ago

As an admin this is madness. I'm good with bash,you know the shell I'll find on any running system.

[–] beeng@discuss.tchncs.de 11 points 1 year ago (2 children)

What is most likely to be standard on a base system image?

[–] erwan@lemmy.ml 4 points 1 year ago

AFAIK all distributions ship with bash as default, except maybe Kali that use zsh.

Any shell will have to be installed, but zsh is probably the most popular shell after bash.

[–] MartinJezhyk@discuss.online 1 points 1 year ago (1 children)
[–] beeng@discuss.tchncs.de 3 points 1 year ago

Well some OS are more popular than others, eg top 6 here https://distrowatch.com/ what would be found over most base images?

[–] Penguincoder 7 points 1 year ago
[–] gideonstar@feddit.de 6 points 1 year ago
[–] boo_@lemmy.blahaj.zone 4 points 1 year ago

I like bash, it's very standard. If you need better autocomplete I'd absolutely recommend ble.sh, which gives you an experience more similar to fish, without having to relearn the entire shell.

Look, I've been a fish user for years and still use it on some machines, but there are always cases where I cannot install fish, or fish is incompatible with a program I use (even via bass) or a feature I use in bash scripting works differently. Of course, I can always fix it, but it's always faster to just drop into a bash shell. I'm also much more familiar with configuring bash than zsh and therefore that's what I use. That's why bash is a staple on all my systems, even my BSD machines.

I think different shells are interesting and provide unique takes on what a shell can do, but telling people to stop using something that's so ubiquitous and useful to learn comes off as grandstanding to me.

[–] bitwolf@lemmy.one 2 points 1 year ago

I still default to bash, but nu had some really cool features like a built in jq and several other formatters and pagers.

[–] flashgnash@lemm.ee 2 points 1 year ago

Bash is good and is standard. Have been experimenting with zsh but don't really see the appeal

If I need to write a script that is too complicated to do in bash I'll do it in python

[–] Franzia@lemmy.blahaj.zone 1 points 1 year ago

Thabks OP. Ive heard of zsh but I basically havent heard of the concept of using different shells. Certainly never used one, but I'll try it tomorrow.