How to change default shell in Linux

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, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

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