• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Why not use bash by default?

walterbyrd

Active Member

Thanks: 26
Messages: 107

#1
I know you can use bash with the FreeBSD, but you have to jump through some hoops.

It seems to me that bash is more powerful, and much more widely used. Yet the BSDs seem to be opposed to it.
 

ekingston

Active Member

Thanks: 48
Messages: 176

#4
FreeBSD seams to try to align with the POSIX standards. Bash is not POSIX compliant, but sh is (mostly). I'm not sure if this is the official reasoning, but it is my observation. Same reason FreeBSD defaults to POSIX awk and grep instead of gawk and gnu-grep.

And, as others have said, licensing.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,079
Messages: 26,940

#5
It seems to me that bash is more powerful, and much more widely used.
Only if you come from a Linux background. On Solaris, AIX, HP-UX ksh is more common. On the *BSDs csh is more common. On Windows CMD.EXE and PowerShell are more common.

Use whichever shell you are most comfortable with, there's plenty to choose from. It's just that the base OS only supplies (t)csh and sh.
 

CraigHB

Member

Thanks: 24
Messages: 90

#6
Bash for me, just what I'm used to. It's not a problem at all to install. Just a pkg job and a little manual configuration. I don't find csh too hard to deal with. There's a few things that differ, but I can use it if I have to. Bash does have a bigger number of options and functions though. It's the system shell (sh) I find hard to deal with, it lacks a lot of stuff.
 

Datapanic

Active Member

Thanks: 123
Messages: 227

#7
Interesting enough, on my old Sunblade 100 running SunOS 5.8 Generic_117350-29 sun4u sparc SUNW has bash is installed by default OS install options:
-r-xr-xr-x 1 root bin 516392 Jan 5 2000 /bin/bash
 

rotor

Member

Thanks: 16
Messages: 49

#8
I know you can use bash with the FreeBSD, but you have to jump through some hoops....
I don't use the sh shell when I use FreeBSD (I tend towards tcsh nowadays). If there are any hoops that need jumping through in order to install a different shell, then I wouldn't call them much of a barrier at all. I just install the package and copy over the profile I use for the shell. It takes a couple of minutes, tops.
 

forquare

Active Member

Thanks: 80
Messages: 200

#9
Interesting enough, on my old Sunblade 100 running SunOS 5.8 Generic_117350-29 sun4u sparc SUNW has bash is installed by default OS install options:
-r-xr-xr-x 1 root bin 516392 Jan 5 2000 /bin/bash
I think newer version of bash shells/bash have an updated license which makes commercial vendors twitchy - hence why macOS has an old version.

Personally, I use shells/zsh. It's a similar evolution of sh(1), and has a similar feature set, but has a more permissive license.
 

Trihexagonal

Daemon

Thanks: 499
Messages: 1,014

#11
sh is all I've ever used on FreeBSD. I have a shell scripting tutorial for it I've read, but I like doing everything by hand.
 

sidetone

Aspiring Daemon

Thanks: 307
Messages: 890

#14
Why is that a question here?
Why wouldn't it be?
Because Bash is a Linuxism, and anyone (truly) familiar with FreeBSD wouldn't ask that question.

It is baffling, why someone with that many posts asks that question. Most literature on FreeBSD (not Unix related variants overall) would have to be skipped for a question like that. It shouldn't have to be explained, because anyone familiar with FreeBSD, should know this, based on almost everything there is to read about FreeBSD anywhere, but especially everywhere on freebsd.org.

That's like operating a forklift, then asking in seriousness, "what's a forklift?"
 

Datapanic

Active Member

Thanks: 123
Messages: 227

#15
Because Bash is a Linuxism, and anyone (truly) familiar with FreeBSD wouldn't ask that question.

It is baffling, why someone with that many posts asks that question. Most literature on FreeBSD (not Unix related variants overall) would have to be skipped for a question like that. It shouldn't have to be explained, because anyone familiar with FreeBSD, should know this, based on almost everything there is to read about FreeBSD anywhere, but especially everywhere on freebsd.org.

That's like operating a forklift, then asking in seriousness, "what's a forklift?"
Citation Please!

Look on Wikipedia - https://en.wikipedia.org/wiki/Bash_(Unix_shell)

"Brian Fox began coding Bash on January 10, 1988[20] after Richard Stallman became dissatisfied with the lack of progress being made by a prior developer.[7] Stallman and the Free Software Foundation (FSF) considered a free shell that could run existing shell scripts so strategic to a completely free system built from BSD and GNU code that this was one of the few projects they funded themselves,"
 

sidetone

Aspiring Daemon

Thanks: 307
Messages: 890

#16
here:
freebsd.org
"Brian Fox began coding Bash on January 10, 1988[20] after Richard Stallman became dissatisfied with the lack of progress being made by a prior developer.[7] Stallman and the Free Software Foundation (FSF) considered a free shell that could run existing shell scripts so strategic to a completely free system built from BSD and GNU code that this was one of the few projects they funded themselves,"
Irrelevant. Bash uses a GPL license, so anyone who knows anything about FreeBSD knows that it is incompatible with its base. So again, these questions are silly, and don't belong here.

So, again this is like a forklift operator asking, "what's a forklift." Does the forklift driver need a citation? Is someone going to ask, what is the definition of "is" and that you need a citation for that? GIVE ME A BREAK.

What do you want a citation for, on the definition of a forklift? or the definition of FreeBSD?
 

sidetone

Aspiring Daemon

Thanks: 307
Messages: 890

#18
Tell the developers to put (GPL licensed) Bash into FreeBSD's base as default, in all seriousness, if you think this is a real question. And they'll wonder if you've read anything at all on freebsd.org

You can't be serious, asking this. I suspect laziness more than trolling, to even ask this.
 

Nicola Mingotti

Active Member

Thanks: 95
Messages: 199

#20
I am new to the FreeBSD world, and I am more interested in stability, order and documentation than licensing. That is the reason why I switched from Linux.

I was also asking myself why bash is not default in FreeBSD and OpenBSD but, since it is so easy to change shell, I found it to be a non-issue.

I am gratefull to walterbyrd to pose the question and to sidetone for his secure answer.

Maybe this information should be put into the FreeBSD Handbook since I think a lot of migrants from the Linux world ask themselves this question. Otherwise, sooner or later someone else will ask again;)

In particular, a good position to write something I think would be here:
https://www.freebsd.org/doc/handbook/shells.html
Where I think many newcomers land and could be made aware of the licensing issue
even if they did not arrive to FreeBSD for licensing reasons.


Bye
Nicola
 

sidetone

Aspiring Daemon

Thanks: 307
Messages: 890

#21
I am new to the FreeBSD world, and I am more interested in stability, order and documentation than licensing. That is the reason why I switched from Linux.

I was also asking myself why bash is not default in FreeBSD and OpenBSD but, since it is so easy to change shell, I found it to be a non-issue.

I am gratefull to walterbyrd to pose the question and to sidetone for his secure answer.

Maybe this information should be put into the FreeBSD Handbook since I think a lot of migrants from the Linux world ask themselves this question. Otherwise, sooner or later someone else will ask again;)

In particular, a good position to write something I think would be here:
https://www.freebsd.org/doc/handbook/shells.html
Where I think many newcomers land and could be made aware of the licensing issue
even if they did not arrive to FreeBSD for licensing reasons.


Bye
Nicola
You're a new user, so it is ok if you recently wondered why. I get baffled when those who've been here for some time ask it.

Everyone knows Bash has more features and so forth, but that's not relevant about why something goes into FreeBSD's base as default.
 

scottro

Daemon

Thanks: 394
Messages: 1,178

#21
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-users/shells.html already gives an explanation, though it doesn't mention the licensing. OpenBSD uses a ksh variant, don't know what the others use, but I suspect that, along with licensing, it has to do with developer preferences. It's so easy to add an additonal shell that I don't think the, "Why" part comes up very often. I think TrueOS may have bash as default, as does MacOS.

Anyway, I think there's something in the rules about personal attacks, so let's try to not get the thread closed.
 

Nicola Mingotti

Active Member

Thanks: 95
Messages: 199

#22
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-users/shells.html already gives an explanation, though it doesn't mention the licensing.
Exactly, I red that page some days ago, the licensing reason should written somwehere there.

What makes a Linux user (unaware of licensing) wander why "tcsh" is that, for example, all scripts in FreeBSD /etc/rc.d at written for "/bin/sh", so it would be "natural" to use "bash" as default shell since it is an "sh" superset. Instead "tcsh" is a "csh" superset. (I am quoting man pages, I have very little expericence with non-bash non-sh shells )
 

scottro

Daemon

Thanks: 394
Messages: 1,178

#23
Yes, tcsh is in the csh family. The sh shell is a Bourne style shell, (Bash stands for Bourne again shell), as is the OpenBSD default ksh.
When Apple first introduced OSX, the first one, (I think it was called Cheetah--they should have stuck with cat names, so we could have releases like American Domestic Shorthair, but I digress), used tcsh. After two or three releases, they changed their default to bash.
 

Spartrekus

Well-Known Member

Thanks: 43
Messages: 285

#25
Bash has many bugs, it is overloaded, Bash would menace the stability of FreeBSD, prob. of license, ... and so and so on, and not necessary at all.

FreeBSD has already many too much things by default !!

It would be like as worst as having a SystemD ;)
 
Top