this post was submitted on 05 Feb 2022
10 points (91.7% liked)

Linux

47343 readers
1552 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
 

Why aren't new terminals that use another language? It seems so antiquated getting errors for not writing the functions in the correct order among other things.

you are viewing a single comment's thread
view the rest of the comments
[–] eyeballkid@lemmy.ml 4 points 2 years ago

Shell scripts usually expect something POSIX-compatible, but you don't have to stick with the default for user-facing tasks. Fish, zsh, powershell, and a whole bunch of niche shells are available to try. Anyhow, in the broad context of Unix default installations bash has a lot of competition.

On several unix-like Oses more than one shell is used depending on context. A great interactive shell with loads of features may be overkill if you just want to execute a script. Some OSes don't use bash at all.

FreeBSD uses tcsh as its default root shell, but it uses ash shell (sh, it started as a clone of Bourne shell) for users and as the interpreter for system commands. This combo confused me at first and led me down a shell research rabbit-hole. ash is a stripped down shell that aims to be small, fast, and largely POSIX-compliant.

In Ubuntu, bash is the default shell for interactive terminals, but dash is used to execute scripts by default. I think that dash started as a debian port of the ash shell.

MacOS and Kali both use zsh as the default shell. I don't know what they use by default to run scripts, but I would guess that it isn't bash.

Also, something that took me a while to figure out is that Bourne-Again Shell (bash) is not the same as Bourne Shell (sh). Further, sh does not always denote Bourne shell, but could be ash or dash or something else.