5 ms·
Minor note: csh isn't cornshell, it's C Shell, because its syntax is somewhat c-like. Korn Shell is ksh, named after its creator, David Korn. A variant of ksh i
by Sanddancer 11y ago
Minor note: csh isn't cornshell, it's C Shell, because its syntax is somewhat c-like. Korn Shell is ksh, named after its creator, David Korn. A variant of ksh is what openbsd uses as their default user shell.
- kayman 11y agoThanks for that correction. Coming from bash background, migrated to zsh on mac, I assumed c is for corn.
- ams6110 11y agoDoes anyone actually use csh as a login shell anymore? Does Mac OS still use tcsh as the default?
- selectodude 11y agoMac OS X has used an old version of bash for awhile now.
- gsnedders 11y agoThey forked the last GPLv2 release.
- gopowerranger 11y agotcsh is the default for root on freebsd and should always be used when working as root.
- codys 11y agowhy?
- gopowerranger 11y ago(t)csh is more likely available and the default on all Unix machines, which is the root of FreeBSD. iirc, bash must be installed everywhere else and is not as readily available except on Linux.
- Sanddancer 11y agoPosix requires a bourne shell of some sort, not (t)csh, with a binary name of sh. Freebsd provides this through Ash. BSDs have traditionally provided a C-shell, with FreeBSD being one of the few that's kept csh as the default. OpenBSD uses pdksh, and NetBSD asks.
- gopowerranger 11y agoPosix is not Unix.
- schwarze_pest 11y agoIt's just best practice. This is what the FreeBSD-Documentation has to say about that topic: "It is recommended that the root user's default shell remain unchanged since shells which are not included in the base distribution are installed to /usr/local/bin. In the event of a problem, the file system where /usr/local/bin is located may not be mounted. In this case, root would not have access to its default shell, preventing root from logging in and fixing the problem." I guess there is nothing wrong with changing the default root shell to /bin/sh, but I don't know why anyone would like to do that.