Thursday, July 30, 2009

Unix shells question ?

Dear all,





could you pls help me :


how can i find out which shells are available in my unix system??

Unix shells question ?
$ cat /etc/shells
Reply:If you're on Linux, you can inspect /etc/shells, but


that isn't universally available on all Unix systems.





Because most shells follow the naming convention of


ending in "sh", you could get an initial idea of the


available shells via:





    ls /bin/*sh /usr/bin/*sh





although that will incorrectly report some non-shell


programs like "/bin/hash".





You could also take a quick look at the programs which


are used as shells by other users on your system (which


is listed as the last field in the password entry). On my


system, that's stored in NIS, so I'd look at the shells in


use by:





    ypcat passwd | awk -F: '{ print $7; }' | sort -u


No comments:

Post a Comment