Tips Linux Explorers   All Things Linux Forum   Great Linux Links   Hometown   Email 


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:

$ 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:


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:

$ /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:

$ /bin/bash

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

$ 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 ?


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

$ ypchsh [user]

and answer the questions.

-- Nov 12 2006 --

Tips Linux Explorers   All Things Linux Forum   Great Linux Links   Hometown   Email