The chsh command is used to change your login shell. If a shell is not given on the command line, chsh prompts for one.
chsh command syntax
The syntax is as follows:
chsh -s /path/to/new/shell chsh -s /bin/ksh userName
How do I print the list of available shell in my system?
The -l option displays the list of shells listed in /etc/shells file:
/bin/sh /bin/bash /sbin/nologin /bin/tcsh /bin/csh /bin/zsh
How do I change my current login shell from bash to ksh?
Simply type the following command:
chsh -s /bin/ksh