View Default Shell

The default shell for each user is stored in the last /etc/passwd file. As an example :

[lica @ clarisa ~] $ grep lica /etc/passwd
lica: x: 500: 500: lica: /home/lica: /bin/bash

In the above example the default shell for lica user is /bin/bash. If you have root access you can of course directly edit this file and change the final column for the user who will change the default shell. The non-root user can only see the contents of the file /etc/password but can not write in the file.

In addition to viewing the contents of the file /etc/passwd you can see the default shell by looking at the contents of the $ SHELL variable.

[lica @ clarisa ~] $ echo $ SHELL
/bin/bash

Leave a Reply

Your email address will not be published. Required fields are marked *