How to change the login shell for Linux user

Use chsh command to change the user login shell. This determines the name of the user’s initial login command. A normal user may only change the login shell for her own account, the super user may change the login shell for any account.

Display list of shell

cat  /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/screen
/bin/tcsh
/usr/bin/tcsh

Change the user login shell to /bin/ksh for user www-data:

chsh -s /bin/bash www-data

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.