If you are interested in trying a different shell with Linux, you can change your login shell using the chsh command, but make sure that the shell is actually installed on your system. For example, to change your default shell to tcsh, first use the which command to verify that it is installed:

$ which tcsh


This example shows that the tcsh shell is installed under the /bin directory. The tcsh shell should also be listed in your system's list of approved shells, /etc/shells. Check to make sure that it is listed:

$ grep tcsh /etc/shells


You can also use the chsh command's -l option to list valid system shells in order to verify that using tcsh is allowed. Because tcsh is installed and listed in /etc/shells, you can then change your shell using the chsh command:

Changing shell for andrew. Password:

New shell [/bin/bash]: /bin/ksh chsh: "/bin/ksh" does not exist.

Note that the chsh command will report an error if you enter the name of a shell not installed on your system.

Changing shell for andrew.


Shell changed.

If you now take a look at your /etc/passwd entry, you will see /bin/tcsh as your default shell. The next time you log in, you will use tcsh.

Was this article helpful?

0 0

Post a comment