Table of Contents

Shells

By default, your shell on Astronomy and other machines is tcsh. To confirm this, in your shell you can type the command:

echo $0

This command will echo back to you which shell you are currently using.

Note, most users will attempt to use bash commands while in the tcsh environment. This will pop up errors because the commands in bash are different than the commands in tcsh. Thus, tcsh will not recognize these commands.

Changing Your Shell

1) You can temporarily change your shell by simply typing the shell you want in the command line. For example, if a user wanted to change to bash, they'd just type 'bash' into the command line and press enter. For example:

[user@astronomy ~]$ bash

You can check to make sure your shell changed, again by using echo $0. Note, this method of changing your shell will only change it for the session you are in.

To permanently change your shell, you can use the chsh command and interface. Simply type:

chsh

It will then ask you to provide your new shell. Please note, you have to provide the full path. For bash, you would provide:

/bin/bash

The prompt will then ask you to enter your password. Once you do, it will change your default shell a persist through new sessions.

Additional Information

As with all UNIX systems, you can customize your workspace. Linux provides several shells which you can work in. By default, all users are set up using tcsh as the login shell. You can start any other shell by typing its name (e.g., bash, sh). If you wish to change your default shell, use the chsh command (see above for details!)

You can define your own aliases, set environment variables using startup files which are read every time the shell is started up. tcsh uses the .cshrc file in your login directory, while bash uses the .bashrc file.

Your account is setup up with a default .cshrc file; the default file has an entry which sources a system wide file which resides in /home/local/etc/cshrc (or /home/local/etc/bashrc for bash). This file sets up a default path so that you will find all of the locally installed applications and packages, and sets some variables which may be used by these packages. You are welcome to modify your .cshrc file as you see fit, but if you want to use the locally installed packages, we strongly recommend you keep the source /home/local/etc/cshrc line in your .cshrc, and also, be careful about making modifications to the command path.