Solved Default Shell Clarification

I was reading other documentation that took me down a rabbit hole questioning default shell on FreeBSD.

Quickstart Guide for Linux - Default Shell states
Bourne shell-compatible sh(1) as the default user shell.
for FreeBSD 14 and later.

Reading though materials on Real Python about subprocess module, an annotation noted
On UNIX-based systems, the sh shell was traditionally the Bourne shell. That said, the Bourne shell is now quite old, so many operating systems use sh as a link to Bash or Dash.
I was not familiar with Dash, so I click through to the wikipedia page. It mentions that Dash is the default `sh` implementation for several distributions, include FreeBSD.

This may seem esoteric, but I'm curious. Can someone confirm? Or is somebody making overzealous wikipedia edits?
 
It mentions that Dash is the default `sh` implementation for several distributions, include FreeBSD.
No, not quite, FreeBSD's /bin/sh is the Almquist Shell originally. It's a bourne shell compatible implementation. Dash is Debian's implementation of the Almquist shell.
 
I miss read the wiki page referenced. Thank you SirDice for the clarity I was looking for and helping me understand my mistake. Here I was writing scripts googling "bourne shell -bash" for tips.
So the rabbit hole I unknowingly dived into was actually useful.
TIL...
 
On writing scripts, you should better consulting official POSIX documentations, for maximum compatibility.
Click Shell & Utitities link on top-left frame and click 2. Shell Command Language link on bottom-left frame.

My guess is that /bin/sh on FreeBSD would be moslty compliant with IEEE Std 1003.1 (“POSIX.1”) or IEEE Std 1003.2 (“POSIX.2”) spec as noted in sh(1).
 
On writing scripts, you should better consulting official POSIX documentations, for maximum compatibility.
Click Shell & Utitities link on top-left frame and click 2. Shell Command Language link on bottom-left frame.

My guess is that /bin/sh on FreeBSD would be moslty compliant with IEEE Std 1003.1 (“POSIX.1”) or IEEE Std 1003.2 (“POSIX.2”) spec as noted in sh(1).

A web searching with just "bourne shell" is not exactly simple. Weeding out the flavours and variations from results is far from painless. The suggestion of the POSIX docs is most useful. Thank you.
 
Back
Top