Discovering What Shell You’re Using

When you first log in to your Unix account, you’ll be using the default shell on your system. The default shell, its features, and its options depend completely on what your system administrator specifies. Code Listings 3.1 and 3.2 show examples of how default shell prompts differ on two different systems.

Code Listing 3.1. This ISP account uses the /bin/csh shell by default.
xmission> echo $SHELL
/bin/csh
xmission> finger ejray
Login name: ejray    In real life:
"RayComm
Directory: /home/users/e/ejray    Shell:
→ /bin/csh
On since Jul 23 06:58:48 on pts/16 from
→ calvin.raycomm.com
1 minute 28 seconds Idle Time
No unread mail
No Plan.
xmission>

To discover what shell you’re using:

  • echo $SHELL

    At your shell prompt, ...

Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.