Answers to: What shells are available on the box ?http://linuxexchange.org/questions/160/what-shells-are-available-on-the-box<p>Hi,</p> <p>Is there a way to determine what shells are available on a Linux box other than trying out <em>/bin/shellname</em> ?</p> <p>Even a workaround would do :)</p> <p>Thanks.</p>enSat, 15 May 2010 12:31:56 -0400Answer by tallshiphttp://linuxexchange.org/questions/160/what-shells-are-available-on-the-box/608<p>which and whereis, along with locate. on a newly installed machine run</p> <blockquote> <pre><code># updatedb </code></pre> </blockquote> <p>when you first install the OS so you can use <strong>locate</strong>, which likes specific syntax,but shows everything matching.</p> <p>And on Slackware you can grep /var/log/packages for a match.</p> <p>For determining, say, whether you had ruby installed, you would type:</p> <blockquote> <pre><code># which ruby </code></pre> </blockquote> <p>And if ruby is installed, you should get back:</p> <blockquote> <pre><code>/usr/bin/ruby </code></pre> </blockquote> <p>...others are python, bash, tclsh, tcsh, zsh, ksh, tksh, sh (usuallaly just a symlink to /usr/bin/bash, but will actually point to /bin/tcsh if you choose the C shell as your particular user's default.</p> <p><strong>man whereis</strong></p> <p><strong>man which</strong></p> <p><strong>man locate</strong></p> <p>to quickly determine the default shell for any particular user simply grep /etc/password for their username and examine the designated shell (or lack thereof) there.</p> <blockquote> <pre><code>$ cat /etc/passwd |grep jschmoe </code></pre> </blockquote> <p>I hope that helps!</p> <p>Kindest regards,</p> <p>Bradley</p> <p>.</p>tallshipSat, 15 May 2010 12:31:56 -0400http://linuxexchange.org/questions/160/what-shells-are-available-on-the-box/608Answer by pmarinihttp://linuxexchange.org/questions/160/what-shells-are-available-on-the-box/535<p>I'm not sure whether the following will double-check the actual existance of the shell files but it should work and looks a little neater too:<p> <code>chsh -l</code></p>pmariniWed, 12 May 2010 17:54:53 -0400http://linuxexchange.org/questions/160/what-shells-are-available-on-the-box/535Answer by gjcwilliamshttp://linuxexchange.org/questions/160/what-shells-are-available-on-the-box/163<p>Have you a look in /etc/shells?</p> <pre><code>cat /etc/shells </code></pre> <p>Thinking about this further you could also make use of "whatis" command for any shells that are not listed in "/etc/shells". </p> <pre><code>cd /bin; whatis * | grep -i 'shell' </code></pre> <p>This will list any shells in '/bin' that have a description that contains the word "shell". It may also be worth doing this in other directories such as /usr/bin, /sbin. This may produce the odd false positive but should give you something to work with.</p>gjcwilliamsMon, 03 May 2010 09:31:37 -0400http://linuxexchange.org/questions/160/what-shells-are-available-on-the-box/163