Change shell 

linux 

okinawa:~$ chsh
Password:
Changing the login shell for suntong
Enter the new value, or press return for the default
Login Shell [/bin/bash]: /bin/tcsh

unix 

chsh

documented on: Thu 11-19-98 09:03:06

How can I make bash my login shell? 

How 

For example, if your login shell is csh or tcsh, and you have installed bash in /usr/gnu/bin/bash, add the following line to ~/.login:

if ( -f /usr/gnu/bin/bash ) exec /usr/gnu/bin/bash --login

(the `—login' tells bash that it is a login shell).

It's not a good idea to put this command into ~/.cshrc, because every csh you run without the `-f' option, even ones started to run csh scripts, reads that file. If you must put the command in ~/.cshrc, use something like

if ( $?prompt ) exec /usr/gnu/bin/bash --login

to ensure that bash is exec'd only when the csh is interactive.

Fulfill 

Because we have to run tcsh (from bash) sometimes, so we need to:

if ( ! $?BASH_VERSION ) exec ~/sbin/bash --login

documented on: Sat 05-29-99 11:12:56