Change the default shell on Unix

Wed, 24 Aug 2022 15:29:40 GMT

Solution

List your shells

cat /etc/shells


cat /etc/shells

Find your current shell

echo $SHELL


echo $SHELL

Change your default shell

chsh -s /path/to/shell


chsh -s /path/to/shell

Examples:

chsh -s /bin/sh
chsh -s /bin/bash
chsh -s /bin/zsh


chsh -s /bin/sh
chsh -s /bin/bash
chsh -s /bin/zsh

References

https://www.cyberciti.biz/faq/change-my-default-shell-in-linux-using-chsh/