From Beocat
Jump to: navigation, search


In this case, I don't believe I can do a better job explaining shells than this. On Beocat, we have tcsh, bash, and zsh available for you to use.


Elsewhere at Kansas State University, the default Shell is set to tcsh. tcsh stands for "TENEX C SHell." It is considered a replacement for csh and uses many of the same features. If you have experience with either csh or tcsh you'll probably feel right at home. This was the default shell on Beocat until July of 2013. If you had an account before then, it is probably still tcsh.

But what if you don't want or like tcsh, what can you do? Well, we have other shells available on Beocat as well.

tcsh configuration files

If you are using tcsh then we are going to assume you know the ins and outs of using it. The most useful of its configuration files is going to be ~/.tcshrc


Bash seems to be the defacto standard shell in most Linux installs today. Bash is common and probably what most of you are used to. As of July 2013, bash is our new default shell. All new users will be set to bash initially.

bash configuration files

Bash has 3 user configurable configuration files, ~/.bashrc, ~/.bash_profile and ~/.bash_logout. We'll look at the two more relevant ones ~/.bashrc and ~/.bash_profile

Bash normally has 3 ways of looking at things, login, interactive, or none.

Normally what happens is that shells that are interactive read ~/.bash_profile, shells that are login read ~/.bashrc. none shells read neither.

In Beocat the flow is a little more sane because of our default ~/.bash_profile: We setup a 4th category of shell, login+interactive. login and login+interactive shells read in both your ~/.bash_profile and your ~/.bashrc, the difference being that the plain login shell stops reading ~/.bashrc at the following statement:

1 if [[ $- != *i* ]] ; then
2         # Shell is non-interactive.  Be done now!
3         return
4 fi

qsub jobs are login, qrsh jobs are login+interactive, logging into Beocat in a way that you can enter commands is login+interactive. There are very few cases that you will get none. For any session that isn't interactive, your sourced files cannot output anything to the screen, or else it can break scp or sftp file transfers.

If they are quiet statements, and you want them in all shells, you can put them before the aforementioned if statement in ~/.bashrc. If they are not quiet or they output anything to the screen, you must put them after the aforementioned if statement in ~/.bashrc.


Zsh is an alternative to bash and tcsh. It tends to support more complex features than either of the other two while using a syntax remarkably similar to bash. Unless specifically noted, when we specify Change your shell to bash, zsh should work as well.

zsh configuration files

If you are using zsh then we are going to assume you know the ins and outs of using it. The most useful of its configuration files is going to be ~/.zshrc.

Changing Shells

Previously, we gave you the option of using a ~/.login to modify your shell. This is no longer supported, if you have issues with your shell/paths/environment variables we will ask you to delete your ~/.login file and change your shell via the method below.

You can change your shell is via chsh on either of the headnodes (athena/minerva).

1 # Change to bash
2 /usr/local/bin/chsh -s bash
3 # Change to tcsh
4 /usr/local/bin/chsh -s tcsh
5 # Change to zsh
6 /usr/local/bin/chsh -s zsh

Once that is done, you will need to logout and log back in to get the new shell. Or you can run SHELL -l where SHELL is replaced by bash, zsh or tcsh