Can't change shell on 15-RELEASE AMD64

I'm unable to change my shell to bash. Bash is installed through pkg and I have used "chsh" to change my shell to

Code:
/usr/local/bin/bash

I login and and it's still the csh shell. Bash is also added to /etc/shells. I do an exec bash and it loads fine. What gives?

**edit**

Looks like my shell was indeed changed but my .bashrc was not being read. Mods feel free to delete this.
 
You might have to log out and log in again. You can grep your username in /etc/passwd, and see what it says for the shell.
Code:
 grep <username> /etc/passwd |awk -F: '{print $7}'
The awk part is if ya wanna get fancier and just show the shell. Then I get

Code:
 grep scottro /etc/passwd |awk -F: '{print $7}'
/usr/local/bin/bash

You can also edit your first post in the thread and mark it solved which is more useful than deleting it, as someone else might have the same question.
 
I login and and it's still the csh shell.
How did you verify that? Was it?:
sh:
echo ${SHELL}


Looks like my shell was indeed changed but my .bashrc was not being read.
Is your problem is that .bashrc is not read on login or that your shell has not been changed to shells/bash?
If your shell is finally changed to bash, but your .bashrc is not read - it's how it is supposed to be. bash(1) reads .bash_profile on login, not .bashrc:
Code:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands
from the file /usr/local/etc/profile, if that file exists.  After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that exists and is readable.

So if you want your .bashrc be read on login, add this line in .bash_profile:
sh:
test -f "${HOME}/.bashrc" && . "${HOME}/.bashrc"
 
Back
Top