6 ms·
Linux systems are made by dozens of disparate teams, and it shows. Every command has a different syntax - just think about how "help" could be -h, --help, -help
by yabones 5y ago
Linux systems are made by dozens of disparate teams, and it shows. Every command has a different syntax - just think about how "help" could be -h, --help, -help, -? etc
BSDs are very tightly integrated. The entire OS is very consistent and 'correct', down to the tiny and pedantic details like putting things under /usr that are usually installed in /bin, because that's the way it's supposed to be. (Ex. `/usr/local/bin/bash`)
Think of it like reading Wikipedia, no matter which page you read it seems like it was written by the same person. That's the kind of consistency that OpenBSD intends to create.
- adamrt 5y agoJust to clarify, Bash is installed under /usr/local because it’s from packages and not part of the base system. The base shell, ksh, is at /bin/ksh. You probably know that but I just felt like being pedantic this morning :).
- chasil 5y ago...and that ksh descended from pdksh, and is distributed as the oksh portable project here: https://github.com/ibara/oksh https://github.com/ibara/oksh The MirBSD Korn Shell also descended from pdksh, and it can be found here: http://www.mirbsd.org/mksh.htm http://www.mirbsd.org/mksh.htm I don't know about the feature differences and code quality between these two; they both implement most of ksh88, and a small amount of ksh93. I prefer mksh when I need something more than a POSIX shell.
- yabones 5y agoYes, absolutely true. The idea is that `ksh` is good enough, and the extra features of bash are extraneous or unnecessary, making it an add-on rather than a core feature. It's an interesting idea, and while I feel bash is absolutely 'good enough' to be part of the base system, I wouldn't want zsh or fish part of my base system - so it's then a matter of opinion whose shell is bloat and whose is essential. So I respect their decision to not include bash in the base image - it's meant to be uncompromisingly lean and simple.
- chasil 5y agoAnother issue is size. This is what I see on CentOS: $ ls -l /bin/bash /bin/dash /bin/mksh -rwxr-xr-x. 1 root root 964536 Nov 22 2019 /bin/bash -rwxr-xr-x. 1 root root 113536 Nov 5 2018 /bin/dash -rwxr-xr-x. 1 root root 296192 Jan 27 2018 /bin/mksh The Debian Almquist shell has nearly nothing beyond POSIX (I believe that local function variables are the only extension). This is the Ubuntu system shell, and it tolerates no bashisms. Alternate POSIX shell implementations in OCaml (and somewhat ADA) accuse Almquist of not using formal grammars and imply that dash is not a safe implementation. https://www.irif.fr/_media/rencontres/pps2018/regis-gianas.pdf https://www.irif.fr/_media/rencontres/pps2018/regis-gianas.p... I would say that mksh implements 80% of bash functionality in much less space, and closely follows ksh88; mksh is also licensed such that Android uses it as /bin/sh. Apple has switched from bash to zsh. I don't know the motivations for this, but preferences for shells wax and wane. BSD doesn't include bash (in base) more because of license than code quality. POSIX seems to be all that we can agree on, but I do wish that standard could grow; it's stuck in the '70s.
- petre 5y ago> Apple has switched from bash to zsh. I don't know the motivations for this GPLv3 vs BSD or MIT license. I lived zsh anyway, switched some of my BSD shells to it afterwards.
- edgyquant 5y agoI love zsh but it’s history doesn’t segregate based on the tty and it locks up a lot during autocompletion for me (on Ubuntu.)
- massysett 5y agoThis is not typically the default setting in zsh (it is if it’s acting like ksh.) Your distributor has probably “helpfully” set it up this way. man zshoptions and look for “SHARE_HISTORY”.
- gtirloni 5y agoAnd that would make me switch from Linux why exactly? Don't get me wrong, I was a BSD user for many years (FreeBSD 3.5-5.0) but I don't think that's enough reason to switch.
- blacktriangle 5y agoIt made me switch from Linux. If it doesn't sound compelling to you, that's okay too, Linux is great. But I do think focusing on the consistency of design really is the best high-level summary of the difference between Linux and OpenBSD.
- Filligree 5y agoConsistency is great, but there's no equivalent to NixOS for the BSDs -- that I know of. Am I actually wrong about that? Is there some declarative configuration system I should be using, which I've simply never heard of?
- blacktriangle 5y agoI think we're talking about different definitions of consistency. In the BSD context, consistancy is that human effort has been put in to get the userspace to look similar. Similar behavior of command line tools, similar documentation, similar configuration, etc. It looks like you're talking about consistancy of packages across installs, which is a totally different issue.
- Filligree 5y agoNo, that's the sort of consistency I was thinking of. I simply want that and all the niceties I'd get from NixOS.
- rgrmrts 5y agoI was actually looking into this as well. I recently switched my server to NixOS and the declarative configuration has been really nice to work with and fits easily into my workflow/tools (emacs with tramp). I’d be really interested in seeing a variant on top of openbsd that has a comparable declarative layer. If anyone knows of such projects, please share!
- space_ghost 5y agoWhy is that "the way it's supposed to be," and how is it going to improve my user experience? It just seems like unnecessary complexity to me.
- andai 5y agoWhen things are consistent, less mental effort goes into remembering arbitrary differences.