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.
Hold the Ctrl key, click your user account's name in the left pane, and select “Advanced Options.” Click the “Login Shell” dropdown box and select “/bin/bash” to use Bash as your default shell or “/bin/zsh” to use Zsh as your default shell. Click “OK” to save your changes.
Users can change shell to any other shell listed in /etc/shells/. The root account can be used to change any other user login shell. If an account has a restricted login shell, then only the root can change that user's shell.
You can change your shell temporarily by creating a subshell and using that instead of the original shell. You can create a subshell using any shell available on your Unix system.
Using the -s or --shell option allows you to easily change the default shell for a specified user. Root (or sudo) access is necessary for using the usermod command. NOTE: Using usermod does not change your current shell, it simply sets the default shell to be used the next time you log on.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With