Set Bash as users default shell

You can change the default shell for a Linux user with the following command.  Change “/bin/bash” to whatever shell you want and replace USERNAME with the Linux user.

chsh /bin/bash USERNAME

Enter in the users password and then log out and back in and the users shell will be whatever shell you specified.  In this case bash.

You can also do this by manually editing the /etc/passwd file.  Find the user by their username, and then replace the last part of the line with the new shell path.

Some Linux distributions (like Kali Linux) use /bin/sh as the default shell for new users.  Changing it to bash makes the shell a little more usable.

Leave a Reply

Your email address will not be published. Required fields are marked *