Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown    



CHANGE YOUR SHELL


There was a question on the forum: "How do I change shell ?" . . .  And the answer is simple, but let me first tell you something about shells.

The default shell for most distros is the bash shell ( See Bash ), but there are more shells available, just type the following command and the ones for your distro will be listed:

CODE
$ chsh -l

This commands will show you the shells that are mentioned in the /etc/shells file.
On my distro the above command will show:

QUOTE
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh


Now imagine I would want to switch to the /bin/sh shell, I can do that just for the session or permanently.

1). For temporary changing the shell you just give the command:

CODE
$ /bin/sh

and you will see the prompt changing to a different one ( again, on my system it shows: "sh-3.00$" ).
You can change it back by simply giving the command:

CODE
$ /bin/bash


2). For permanently changing the shell you can use the "chsh" command:

CODE
$ chsh -s /bin/sh

You will be prompted for a password and for confirmation it will show you for what user you are changing the shell.

Now, that was an easy one, wasn't it ?




Bruno


A note from finotti on the forum: In some systems (using NIS) you might have to use:

CODE
$ ypchsh [user]

and answer the questions.



-- Nov 12 2006 --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown