Changing Your Shell Temporarily

You can change your shell temporarily by creating a subshell and using that instead of the original shell. You can create a subshell using any shell available on your Unix system. This means that you can look in the /etc/shells file and use a shell listed there, or you can use a shell installed elsewhere on the system (Code Listing 3.6).

Code Listing 3.6. Checking the list of shells from /etc/shells and looking for other programs that end with “sh” is a good way to find all of the shells on the system.
[ejr@hobbes]$ cat /etc/shells
/bin/bash
/bin/sh
/bin/tcsh
/bin/csh
[ejr@hobbes]$ ls /usr/local/bin/*sh
/usr/local/bin/pdksh
[ejr@hobbes]$
Code Listing 3.7. Type in the shell name (which is really just another ...

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.