List your shells in Linux
Now to change the shell, first, we need to see which shells are installed on the system. We can check installed shells using the following command :
cat /etc/shells
This will show all shells as follows:
Before moving further, first understand who can change the user shell
- 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.
How To Change Default Shell In Linux
In most Linux systems, the default shell is bash but we can change that to any other shell-like zsh, fish, sh, and any other. In this article, we are going to show how to change that default shell to any other shell in Linux systems. To change the user’s shell, first, let’s find the current shell. There are many ways by which we can change the shell of any user on a Linux system. We are going to see three methods of changing the user’s shell.