this post was submitted on 29 Jan 2026
22 points (95.8% liked)

Linux

61653 readers
900 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
 

Recently I got really interested in debloating and hardening my operating systems, cause I'm heavily inspired by Unix and "worse is better" philosophy. As I heard bash is heavy and we have much more lightweight and faster alternatives like these mentioned in title. They must be great alternative for scripting and interpreting but is there any reason to use them on my machines as interactive shell? Anyone are using them? Also is it worth to learn them as bash is standard IT industry?

you are viewing a single comment's thread
view the rest of the comments
[–] thingsiplay@lemmy.ml 2 points 12 hours ago (1 children)

In the past I replaced Bash as the default POSIX shell interpreter /usr/bin/sh with Dash. Normally the /usr/bin/sh is run by Bash in compatibility mode, if no Bash features are needed. Dash is an independent implementation of /usr/bin/sh compatibility and in theory should startup a little faster than Bash for those scripts. In practice I didn't notice any difference on my modern computers (and I mean more than a decade old by now). My personal experience and recommendation is not to worry about this and not install Dash at all. If you do, nothing will break or get worse, but I believe nothing is won either.

Dash as an interpreter for /usr/bin/sh is only for shell scripts, that run the shell in default mode without Bash or other features. It is not intended for use in the terminal in an interactive manner.

Learning Bash? Oh hell yeah! The language is a bit ugly and has really lot of pitfalls and dumb language constructs or default behavior. But it is the default and you can rely on Bash for the most part in Linux. You can write scripts, understand others scripts and make changes to them. And it is even used in the IT industry everywhere (well maybe not everywhere...). But that's not all, you have to learn Linux stuff too, not just the scripting language to make most use of it. While Bash the language itself is ugly, it is still useful to learn the basics and get into it a bit deeper over time. I fully recommend it.

[–] mlody@lemmy.world 2 points 12 hours ago (1 children)

I was asking about that ksh because I love OpenBSD and in OpenBSD it's default shell. As I like to experiment with different operating systems, not only Linux I think that much better for me would be to learn POSIX shell. What's difference between POSIX shell and bash by the way?

[–] thingsiplay@lemmy.ml 1 points 11 hours ago (1 children)

POSIX shell is the standard that all shells should support (Fish does not I think). Its basically what is executed if you run it as /usr/bin/sh script. POSIX is not a specific shell itself, its just the standard. /usr/bin/sh is usually a symbolic link to an actual shell interpreter. And any shell could support it, in example Bash with its compatibility mode (what is usually done by default in todays Linux systems). Or Dash is designed to do that specifically and only that as far as I know.

Bash on the other hand is an enhanced shell that introduces some concepts, features and changes default behavior of the standard POSIX. That is when the script runs with /usr/bin/bash. This is also used in your terminal as the interactive shell. And ZSH in example is similar to Bash, but has some extended features over Bash. They are relatively speaking similar. I think ZSH is or was the default shell in MacOS too.

As for KSH, I don't have no experience about this myself. I only know it exists and just saw checklists of differences.

[–] mlody@lemmy.world 0 points 11 hours ago

ZSH is used by MacOS at the moment as interactive shell. I have these shitty laptops in school