Changing your shell with chsh

If you decide that you want to change your shell, you probably can, depending on how your system administrator has set things up. As Code Listing 3.5 shows, you would do so using chsh. We usually change to bash.

To change your shell with chsh:

1.
cat /etc/shells
At the shell prompt, list the available shells on your system with cat /etc/shells.
2.
chsh
Enter chsh (for "change shell"). Code Listing 3.5 shows the system response. Some systems prompt for a password, and some don't.
3.
/bin/bash
Type in the path and name of your new shell.
4.
su - yourid
Type in su - and your userid to re-log in to verify that everything works correctly. If it doesn't, then use chsh again and change back to the original shell or ...

Get Unix: 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.