How to set the default shell in Linux

One thing I always forget when logging into a new Linux server is is how to set the default shell.

The below command sets the default to bash

chsh -s /bin/bash

From the man page for chsh

The chsh command changes the user login shell. This determines the name of the users initial login command. A normal user may only change the login shell for her own account, the superuser may change the login shell for any account

Replace /bin/bash with the path to your preferred shell

Justin Kelly

Justin Kelly

Data Engineeer, Business Analytics, Web Developer, Library Technology specialising in PHP and Tableau

Based in Melbourne, Australia

Feel free to contact me justin@kelly.org.au or _justin_kelly