Changing default shell in Linux [closed]

Try linux command chsh.

The detailed command is chsh -s /bin/bash.
It will prompt you to enter your password.
Your default login shell is /bin/bash now. You must log out and log back in to see this change.

The following is quoted from man page:

The chsh command changes the user login shell. This determines the
name
of the users initial login command. A normal user may only change the
login shell for her own account, the superuser may change the login
shell for any account

This command will change the default login shell permanently.

Note: If your user account is remote such as on Kerberos authentication (e.g. Enterprise RHEL) then you will not be able to use chsh.

Leave a Comment