You can typically tell which family your shell belongs to by a character in the prompt that it displays. Bourne-type shells, such as bash , usually have $ in the prompt. The C shell uses % (but tcsh users often use >). If the shell that you use has superuser privileges, then the prompt usually ends with a hash, #.

To check the shell that runs automatically when you log in to Unix or Linux, type the following command:

% grep yourloginname/etc/passwd

e.g. grep garyh /etc/passwd

You should get back the contents of your entry in the system password file. For example:

garyh:*:1006:1006:Gary Hall:/usr/home/garyh:/usr/local/bin/bash

The fields are separated by colons, and the default shell is usually identified in the last field.

Note that in Mac OS X, passwords are managed and stored in Netinfo by default. To store the passwords in /etc/passwd, you'll need to configure this using Netinfo.


comments powered by Disqus
Gary Hall Gary Hall is based in East Yorkshire, England, and has a background in education, marketing and technology. This site is a collection of ideas and resources on these topics.