CSUF LogoCSUF Site Navigation

F10 Post-Installation Changes Shell Environment

Department of Electrical and Computer Engineering
Assistant Professor Gregory R. Kriehn
F10 Shell Environment

The following information is taken from www.faqs.org/faqs/unix-faq/shell/shell-differences/. If you are unfamiliar with the concept of Unix-based shells, I suggest reading the FAQ in its entirety. For general day-to-day use, my old preference was to use tcsh, but seeing how the Linux world has been migrating over to bash for quite some time now, I finally decided to make the switch myself — especially after I noticed that tcsh has been moved out of the main distribution and into Fedora Extras.  tcsh has also become increasingly frustrating for me to use with Enlightenment (particularly Entrance), and to get it to recognize /etc/DIR_COLORS correctly (used to color code file types), so after I performed some basic research on the syntax, I switched over bash without too much difficulty.

Shell features

This table below lists most features that I think would make you choose one shell over another. It is not intended to be a definitive list and does not include every single possible feature for every single possible shell. A feature is only considered to be in a shell if in the version that comes with the operating system, or if it is available as compiled directly from the standard distribution. In particular, the C shell (csh) specified below is that available on SUNOS 4.*, a considerable number of vendors now ship either tcsh or their own enhanced C shell instead (they don't always make it obvious that they are shipping tcsh).
                                     sh   csh  ksh  bash tcsh zsh  rc   es
Job control N Y Y Y Y Y N N
Aliases N Y Y Y Y Y N N
Shell functions Y(1) N Y Y N Y Y Y
"Sensible" Input/Output redirection Y N Y Y N Y Y Y
Directory stack N Y Y Y Y Y F F
Command history N Y Y Y Y Y L L
Command line editing N N Y Y Y Y L L
Vi Command line editing N N Y Y Y(3) Y L L
Emacs Command line editing N N Y Y Y Y L L
Rebindable Command line editing N N N Y Y Y L L
User name look up N Y Y Y Y Y L L
Login/Logout watching N N N N Y Y F F
Filename completion N Y(1) Y Y Y Y L L
Username completion N Y(2) Y Y Y Y L L
Hostname completion N Y(2) Y Y Y Y L L
History completion N N N Y Y Y L L
Fully programmable Completion N N N N Y Y N N
Mh Mailbox completion N N N N(4) N(6) N(6) N N
Co Processes N N Y N N Y N N
Builtin arithmetic evaluation N Y Y Y Y Y N N
Can follow symbolic links invisibly N N Y Y Y Y N N
Periodic command execution N N N N Y Y N N
Custom Prompt (easily) N N Y Y Y Y Y Y
Sun Keyboard Hack N N N N N Y N N
Spelling Correction N N N N Y Y N N
Process Substitution N N N Y(2) N Y Y Y
Underlying Syntax sh csh sh sh csh sh rc rc
Freely Available N N N(5) Y Y Y Y Y
Checks Mailbox N Y Y Y Y Y F F
Tty Sanity Checking N N N N Y Y N N
Can cope with large argument lists Y N Y Y Y Y Y Y
Has non-interactive startup file N Y Y(7) Y(7) Y Y N N
Has non-login startup file N Y Y(7) Y Y Y N N
Can avoid user startup files N Y N Y N Y Y Y
Can specify startup file N N Y Y N N N N
Low level command redefinition N N N N N N N Y
Has anonymous functions N N N N N N Y Y
List Variables N Y Y N Y Y Y Y
Full signal trap handling Y N Y Y N Y Y Y
File no clobber ability N Y Y Y Y Y N F
Local variables N N Y Y N Y Y Y
Lexically scoped variables N N N N N N N Y
Exceptions N N N N N N N Y

Key to the table above.

Y Feature can be done using this shell.

N Feature is not present in the shell.

F Feature can only be done by using the shells function

L The readline library must be linked into the shell to enable
this Feature.

Notes to the table above

1. This feature was not in the original version, but has since become
almost standard.
2. This feature is fairly new and so is often not found on many
versions of the shell, it is gradually making its way into
standard distribution.
3. The Vi emulation of this shell is thought by many to be
4. This feature is not standard but unofficial patches exist to
perform this.
5. A version called 'pdksh' is freely available, but does not have
the full functionality of the AT&T version.
6. This can be done via the shells programmable completion mechanism.
7. Only by specifying a file via the ENV environment variable.
With that as background, changing your default shell is very simple. A user's shell environment is defined within /etc/password (along with their user name, id, group id, full name, and home directory; the actual encrypted password is stored in /etc/shadow). Edit the file with nano:
$ sudo nano /etc/passwd
Hit enter and type ^W to do a search, and type in your username. Scroll over to where it says /bin/bash and if you want to switch to something else, replace it with the path of the shell you want to use.  Hit ^o to save and ^x to exit. Logout of Gnome (System -> Log Out [username]...) and re-login to fully activate your new shell environment.

NOTE:  Because I have decided to stick with bash, I no longer edit my /etc/passwd file, and I no longer need to use a ~/.tcshrc configuration file.  Instead, I now use a .bashrc Script.