Live data from Hacker News

FreeBSD switches the default root shell from csh to sh

cgit.freebsd.org

51–60 of 154 posts

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

#51
post #42
post #35

Earlier quoted context omitted.

I've been trying to stick with bash for at least 20 years (I did have a brief tcsh phase before that) since a time when sticking with it meant having to install it on every unix system I touched. However, now that MacOS defaults to zsh, I'm starting to wonder if I should summon up the effort to change again.

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.

Apple switched to zsh because newer versions of bash are licensed under GPLv3.

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

#52
post #43
post #38

Earlier quoted context omitted.

Right, but the up arrow didn't get in their way, right? So why get mad? I imagine that how it worked for them before is that the up arrow would move the cursor to the previous line into the output of the previous command, while feeding the arrow key escape sequences to the shell prompt as part of the command. IOW, a pretty useless and annoying key right? Why even press it? How did they notice readline?

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?

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

#53
>"This changes also simplifies making tiny freebsd images with only sh(1) as a shell"

What's the current process to make extremely small "minimal" freebsd server install?

Is it Nanobsd[1], because the unfortunate downside is that the base can't change (I realize that's a feature) and for a web server or database server that might not be ideal.

[1] https://docs.freebsd.org/en/articles/nanobsd/

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

#54
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 think the Slowlaris moniker was not due to Solaris itself, but the speed of their SPARC processors. I used to work very closely with x86 Solaris for financial trading and it was performant (and stable!) on Intel hardware at the time (circa 2010). At the time Solaris 10 was feee as in beer. When Oracle took over they got rid of this and wanted $1K per CPU socket per year on non Sun/Oracle hardware. Needless to say e…

The Slowlaris name is much older than that, going back to when they made the switch from BSD to System V in 1991. You could install either the retroactively named Solaris 1.x versions or the new 2.x on the same hardware, and everyone noticed that the new OS was much slower.

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

#55
post #42
post #35

Earlier quoted context omitted.

I've been trying to stick with bash for at least 20 years (I did have a brief tcsh phase before that) since a time when sticking with it meant having to install it on every unix system I touched. However, now that MacOS defaults to zsh, I'm starting to wonder if I should summon up the effort to change again.

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.

IIRC, MacOS had to ship with a fairly old version of bash by default because newer versions have a more copyleft license; I always assumed that their swap to zsh was because they wanted something both up to date and compatible in terms of the license (and the fact that most bash "just works" when you run it in zsh is a plus).

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

#56

A die-hard tcsh user myself, I mourn the end of an era, but has anyone done serious scripting in the C shell? I jokingly call it a sin in the eyes of the LORD, but seriously, it really, really sucks compared to even just the POSIX shell. It's probably time for me to finally give into Bash or zsh or something equally modern. Might be nice to get access to all of those shell completion hooks some tools have—not because…

The surprisingly-"smart" completions are the only thing I really notice about zsh vs. bash, but AFAIK you can add the same functionality to Bash if you like. Ditto the git-related prompt modifications, like showing the current branch or whether your working dir is dirty, which is kinda nice—you can configure that sort of thing in bash, as well.

You can do all kinds of fancy stuff with zsh (especially via something like oh-my-zsh) but it bloats it and slows it down too much for my liking. Maybe if I were trying to work on a machine with no GUI, I'd go for that sort of thing. As it is, I don't need a battery level graph or load monitor or whatever, always visible in my terminal.

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

#57

A die-hard tcsh user myself, I mourn the end of an era, but has anyone done serious scripting in the C shell? I jokingly call it a sin in the eyes of the LORD, but seriously, it really, really sucks compared to even just the POSIX shell. It's probably time for me to finally give into Bash or zsh or something equally modern. Might be nice to get access to all of those shell completion hooks some tools have—not because…

Even back when most people I knew used tcsh interactively, any significant scripting we did was for korn shell. It's been so long I don't remember what would have been so bad about tcsh scripting, but since we all made that choice I assume we would have agreed with you.

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

#58

A die-hard tcsh user myself, I mourn the end of an era, but has anyone done serious scripting in the C shell? I jokingly call it a sin in the eyes of the LORD, but seriously, it really, really sucks compared to even just the POSIX shell. It's probably time for me to finally give into Bash or zsh or something equally modern. Might be nice to get access to all of those shell completion hooks some tools have—not because…

Tom Christiansen's essay "Csh Programming Considered Harmful" was commonly passed around the early internet and lists all the reasons why scripting in csh is terrible. I always considered csh purely for interactive use (where it was light years ahead of sh) and switched to ksh (or perl back in those days) for scripting.

http://harmful.cat-v.org/software/csh

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

#60
post #12
post #3

In the recent history sh(1) has gain the missing features for it to become a usable interractive shell: - command completion - ... Too much bloat for my tastes.

What's the harm? I'm guessing your alternative is: echo $PATH | sed 's/:/\n/g' | xargs ls | grep command_im_looking_for

Additionally, an empty element in this context means $PWD
Post reply on HN