Live data from Hacker News

FreeBSD switches the default root shell from csh to sh

cgit.freebsd.org

71–80 of 154 posts

Re: FreeBSD switches the default root shell from csh to sh

#71
post #11

We once upgraded a major research department from csh to tcsh (while also migrating most users to bash). A senior leader complained that when they hit the up arrow, the last command they typed showed up. I explained how to disable readline

I wonder what he was using the up arrow key for in the shell.

How do you know he was a he?

Re: FreeBSD switches the default root shell from csh to sh

#72
post #24

Earlier quoted context omitted.

Pre-1992 it was SunOS and yes that is exactly what we want (without all the security holes). SunOS was BSD and Nirvana as far as Unix goes. Solaris was SysV and quickly earned the nickname "Slowlaris". For me FreeBSD is the functional descendant of SunOS. As for Linux I first tried it out in 1993 and was appalled that command line switches for most standard Unix utils had been arbitrarily remapped. Tried FreeBSD 1.0…

> I wonder how many other greybeards that cut their teeth on SunOS prefer FreeBSD over Linux today? Not a greybeard but I certainly reach for a BSD when I want to "use Unix". Linux is a quivering basket case that cant decide if its Unix, MacOS or Windows.

> Linux is a quivering basket case that cant decide if its Unix, MacOS or Windows.

A more positive spin on this would be that it combines the best of all three.

Personally I'm very much in the Unix camp though, and have the proverbial greybeard long enough to trip over. But I can see the value in the "Linux way" of doing things. Actually, I mostly just use Linux myself these days, mainly because of software compatibility and because it's "Unix-y enough" with the right distro; a decent trade-off.

Re: FreeBSD switches the default root shell from csh to sh

#73
post #43

Earlier quoted context omitted.

from what I can tell he was looking hard for problems. He also noticed that if you ran 9 "yes" commands on a 8 core machine, the CPU wasn't allocated in 8/9ths units (one process always got a lot less CPU). he was used to much more predictible CPU scheduler on multiprocessor systems (spoilt by TruCluster). Linux later adopted a better scheduler (fair share) so imho he was right on that one, even if "yes" is a terribl…

It seems the lesson here is that changing things out from under someone isn't a good look. What would have been the cost in not changing users' shells for them?

Everybody else has a worse shell.

Re: FreeBSD switches the default root shell from csh to sh

#74

Earlier quoted context omitted.

I totally understand that, I'm not a young mind anymore, and I get that most of these are pointless superficial tricks. I spend most of my days venting about the state of computing (especially since web2.0 came and replaced a lot of stuff with bloated regressions in many offices) But I considered readline a good addition, not a waste of time and neurons. ps: I stopped using zsh/fish, my emacs theme is the vanilla the…

I work half as fast without fish completions. matters to some people

Fish truly is superior for productivity.

Re: FreeBSD switches the default root shell from csh to sh

#75
post #59
post #34

Obligatory "CSH considered harmful" by Tom Christiansen around 1995. http://www.faqs.org/faqs/unix-faq/shell/csh-whynot

Christiansen is correct that it is a terrible programming language. It's a great shell for user input.

Yes and no; you do run in to problems with that as well, for example trying to get a git branch in your prompt in a performant way that is rather complex. Things like more advanced aliases or completions will hurt your brain (or at least, they hurt my brain), etc. Also: there is no way to get the line number of an error, so made a mistake in your .tcshrc and it's a pain.

I never especially liked that csh-whynot article as I feel it focuses a bit on the wrong things, and things people rarely use in day-to-day usage.

I used tcsh for many years (as it was the default on FreeBSD, the first system where I seriously used the CLI), but I can't really think of many things it does better than either bash or tcsh nowadays. The only thing is that you can set "noclobber" to "notempty" and "ask", but at least "notempty" was added in zsh recently; AFAIK bash can't do that. It's a small but very useful feature for cases where you type "wrong-cmd > foo" and then up and "wrong-cmd-corrected > foo".

Re: FreeBSD switches the default root shell from csh to sh

#76
post #40

Earlier quoted context omitted.

Those are not part of the base system.

And for good reason. If people already call command completion bloat, imagine the uproar if they found out that bash or zsh is built in and the default shell.

FreeBSD is often used as the base for appliances, so some downstream users it may indeed be unnecessary code to maintain. (You perhaps get 'extra' CVEs against your product that may increase maintenance.)

For those with CLI access, adding a more full-featured shell is fairly easy with pkg.

Re: FreeBSD switches the default root shell from csh to sh

#77

Earlier quoted context omitted.

I wonder what he was using the up arrow key for in the shell.

How do you know he was a he?

without certainty, prior probabilities suggest a technically inclined research leader would be male.

Re: FreeBSD switches the default root shell from csh to sh

#78
post #42

Earlier quoted context omitted.

personally, I don't have interest in zsh because bash is the default shell in Linux, which is the UNIX system I use (I find mac's unix to be really a weird variant). Mac switching to zsh is just more evidence they're diverting from the mainstream.

> I find mac's unix to be really a weird variant It's closer to BSD than it is to Linux. Not super similar, but closer, especially in ways one tends to notice on the command line.

you're right, Mac OS X is a derivative of BSD but it also has significant Mach tech (like the linker).

I've used freebsd for years and I still find Mac OS to be the least useful UNIX.

Post reply on HN