-->
UNIX Shell - Changing it

UNIX Shell - Changing it

We don't offer any permanent methods of changing to an alternate shell through chsh or similar methods. However, one good way to work around that is just to log in to your default tcsh shell, and then type the following command. (Note that this treatment primarily covers the popular bash shell; however, similar procedures can be used for other shells.) :

exec bash --login

This command replaces the currently running shell with the bash shell, and starts bash just as if it had been directly invoked via login. (For more info on this, see the URL http://www.gnu.org/manual/bash-2.05a/html_chapter/bashref_6.html.

You could potentially put this line in your .login to have it automatically run when you login--however, I seem to have some problems with this when doing a XDMCP X-Win login to the sparc unix boxes here. What I recommend instead is making an alias such as the following (which I put in my .cshrc file to be read by tcsh upon startup):

alias mybash 'exec bash --login'

If you make this alias, then you can just type mybash at the command line after you log in to unix, and it will start bash for you.

If you have some startup things for bash to do when you start it, you can put them into a .bash_profile file in your home directory, which bash will read but tcsh will not.


To Top of Page To Top Of Page Printer Friendly Version

©CSG Helpdesk

Valid CSS!