In lab linux bash prompt the task in which it is expected to change the shell type this is what I found .
Q. Change the SHELL for Bob from bash to Bourne Shell
Bob’s password is caleston123
Hint : use the chsh command
Output
bob@caleston-lp10:~$ echo $SHELL
/bin/bash
bob@caleston-lp10:~$
bob@caleston-lp10:~$ chsh
Password:
Changing the login shell for bob
Enter the new value, or press ENTER for the default
Login Shell [/bin/dash]: /bin/sh
bob@caleston-lp10:~$
bob@caleston-lp10:~$ echo $SHELL
/bin/bash
bob@caleston-lp10:~$
After doing this the check passes .
When we do $echo $SHELL before and after this no change is being observed in the output. How come the check passes and what change has been implemented then ?
As it appears the shell is still the same which was before the change using chsh .
To know the current shell do echo $SHELL and to change the particular user shell by command then do sudo usermod -s /bin/sh bob . If before allocated to bash after this user modification it will change to sh shell.
or
If you want to do by command line and wanna make it permanent then entry user’s home directory bash profile.