Changing Your Shell with chsh


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.

Code Listing 3.5. You must remember the path to the shell to change shells on this system. Additionally, the password check helps ensure that only the account owner changes the shell.

[ejr@hobbes ejr]$ cat /etc/shells /bin/bash /bin/sh /bin/tcsh /bin/csh /bin/zsh [ejr@hobbes ejr]$ chsh Changing shell for ejr. Password: New shell [/bin/bash]: /bin/zsh Shell changed. ejr@hobbes ~ $ ejr@hobbes ~ $ su - ejr Password: ejr@hobbes ~ $ 

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/zsh

Type in the path and name of your new shell.

4.

su - yourid

Type in su - and your userid to relog in to verify that everything works correctly. If it doesn't, use chsh again and change back to the original shell or to a different one. If you can't change back, email your system administrator for help.

Tips

  • After changing shells, you might have problems running some commands or have a prompt or display that's not as good as the original. That's likely a result of your default shell being carefully customized by your system administrator. You're probably on your own to set up and configure your new shell, and Chapter 8 can help you do this.

  • Some systems don't let users use chsh to change shells. If this is the case, you'll need to email your system administrator and ask for a change, or see if there are alternative methods, as shown in Figure 3.2. You could also change your shell temporarily, as described in the next section.

    Figure 3.2. Some ISPs provide a handy interface for changing shells that lets users pick their new shells from a menu, like this one.

  • See Changing Your Identity with su later in this chapter for more about the su command.





Unix(c) Visual Quickstart Guide
UNIX, Third Edition
ISBN: 0321442458
EAN: 2147483647
Year: 2006
Pages: 251

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net