Linux basic course lab

when I type again echo $SHELL then it is showing same /bin/bash… not /bin/sh

please guide

chsh changes the shell for the next time that user logs in. It cannot change the shell of the currently logged in session.

To see the effect of changing the shell, you need to create a new login session (using su command) that will then have the new shell.

bob@caleston-lp10:~$ sudo chsh -s /bin/sh bob
[sudo] password for bob: 

bob@caleston-lp10:~$ su - bob
Password: 

$ whoami
bob

$ echo $SHELL
/bin/sh

Remember to exit from this sub-shell before proceeding to next questions

$ exit
bob@caleston-lp10:~$         
1 Like