How is it possible to change the default shell? The env
command currently says:
SHELL=/bin/tcsh
and I want to change that to Bash.
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
.
chsh: can only change local entries; use ypchsh instead
. Then ypchsh doesn't have any -s
option — Oct 24, 2012 at 09:31 /etc/passwd
, but I didn't double check it. — Feb 11, 2014 at 13:18 exec /bin/bash
to ~/.profile
and this allowed me to login directly to bash without making any changes to the server. (The original default shell was just /bin/sh
) — Aug 18, 2014 at 19:38 exit
in bash? Will you logout the server directly or just exit the bash and into the sh and another exit
required to logout the server? — Aug 19, 2014 at 04:32