The Default Shell in FreeBSD 8.0

11 May 2010

Original Blogger tags: FreeBSD

I’ve been setting up a FreeBSD machine to function as a firewall/router. So far it has gone very smoothly and very quickly, but there has been one hiccup that drove me up a wall: the shell.

Apparently, if you use the installer to configure a user account with csh, you don’t actually get csh. I found this out because I wanted command-line completion. I don’t even need anything fancier than that for configuring this box, but I can’t live without command-line completion — it’s ingrained in my muscle memory!

If you edit /etc/passwd to set your shell to csh, you don’t actually get csh. Your environment will tell you that you are using csh, but it isn’t actually csh. Therefore, adding options like “set autolist” to your .__csh__rc file won’t do anything.

To make it work, I had to do chsh -s /bin/csh, and I magically had command completion functioning again, without modifying any dot files.

I’m not accustomed to FreeBSD, but apparently this has something to do with the file etc/master.passwd which is used to generate /etc/passwd, so modifying your shell via /etc/passwd doesn’t work, even if it appears to change.

Apparently, per some Google searches, I’m not the only one to find this very confusing!

Creative Commons Licence
This work by Paul R. Potts is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. The CSS framework is stylize.css, Copyright © 2014 by Jack Crawford.

Year IndexAll Years IndexWriting Archive