I'm trying to convert from a tcsh to bash. Things I have tried:
chsh
chsh -s /bin/bash
chsh: can only change local entries; use ypchsh instead
ypchsh
ypchsh /bin/bash
ypchsh: can't get local yp domain: Local domain name not set
I discovered I don't have sudo access after trying
sudo -s /bin/bash *username*
Then I tried creating a .cshrc file:
echo "I exist in .cshrc"
setenv SHELL /bin/bash
exec /bin/bash --login
When I do this however, I can't log in to my account. I enter my username and password and it looks like it's logging me in, but instead it kicks me back out to the login screen.
I know it has something to do with the last two lines, and not the file in general because I tested it again with just the echo
command and I had no problems.
/etc/passwd
file?/etc/passwd
has entries for every user. Find your user, and change the last value on the line to the shell you want. This means that all the other users on your system can use /etc/sh, but only your user has the new value set as the default. This will mean that any scripts referencing /bin/sh will not break./etc/passwd
, but rarely they are stored elsewhere.chsh
is supposed to deal with that for you, but if it doesn't, one can use/etc/passwd
manually. I do not know much about default shells past this, though. Sorry I couldn't be of more help.