How to change user's shell type in Linux#

To change a user's shell type in Linux you use the chsh command.

Before using that you may want to see the curtrent default shell of the user. To see the current shell type, do the following:

$ cat /etc/passwd | grep jack

So the user jack's shell type is currently sh. To change it to bash, we'd do the following (make sure you have the appropriate privilege first):

# chsh -s /bin/sh jack
Changing shell for jack.

Shell changed. Happy changing shells!

Tweet this | Share on LinkedIn |