The default shell environment in our Linux Lab uses bash. However some software used by our students may require a different shell, such as tcsh.
Please Read This First
ECE Computing does not actually recommend you switch your shell, since it can (and frequently does) completely break an inexperienced user’s login to a Linux computer. Instead, we recommend leaving your login shell alone and just switching to another shell as needed, using one of the following commands (replace “tcsh” with whichever shell you wish to run; e.g. csh, zsh). Option 2 is preferred, but either will work:
(Option 1) /bin/tcsh (Option 2) exec /bin/tcsh -l # that's a lowercase "L", not a "one"
However, we realize some people prefer to work in a shell other than bash by default.
How to Switch Your Shell
At present, it’s technically not possible to change your default shell away from bash on ECE systems. Practically speaking, however, you can accomplish the same thing by adding the following lines at the very top of the file .bash_profile that’s in your home directory (you’ll need to create the file if it doesn’t already exist):
PREFERRED_SHELL="tcsh" PREFERRED_SHELL_LOCATION=$(which $PREFERRED_SHELL) if [[ $PREFERRED_SHELL_LOCATION != "" ]] ; then echo "$PREFERRED_SHELL found - switching..." exec $PREFERRED_SHELL_LOCATION -l else echo "Did not find $PREFERRED_SHELL - falling back to bash..." fi
Copy everything *exactly* as shown above (even the spacing) into your .bash_profile file.
In the first line you can change “tcsh” to any valid shell, such as “zsh” – but be careful not to add any spaces around the equals sign if you do that.