How to change default shell in Linux

Posted on in Categories Link last updated January 6, 2017

Want to change the default shell in Linux/Unix/MacOS? Try:

chsh -s /path/to/shell user

For example, set the shell to /usr/local/bin/zsh for user tom, enter:
which zsh
chsh -s /usr/local/bin/zsh tom

For more information see Howto: Changing Linux Login Shell

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Share this on (or read 0 comments/add one below):

Leave a Comment