The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using 'stat' to determine file system type (with Zenity) mdpalow Shell Programming and Scripting 0 12-20-2007 01:49 AM
Different type of shells? charbel Shell Programming and Scripting 1 05-05-2006 08:05 AM
more than one fs type on the same file system livemyway HP-UX 1 12-06-2005 07:11 AM
Good Unix Shells ? IceCold UNIX for Dummies Questions & Answers 1 11-03-2002 11:03 PM
Different type of Shells sivhard Shell Programming and Scripting 5 10-08-2002 10:20 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-10-2008
shuhang2 shuhang2 is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 2
How do I know what type of shells are available in my Unix system?

How do I know what type of shells are available in my Unix system? Are there a single command or environment variable that can let me find that out?

Best regards,

John Chan
  #2 (permalink)  
Old 10-10-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,259
A ring to to rule them all... err.. a command to list them all hm, I don't know one. Maybe this helps:

Your current shell:
Code:
echo $SHELL
For the initial shells of your users check the /etc/passwd.

Depending on which OS you are, you can query your software package management tools like for example:
Code:
rpm -qa| grep -i shell     # Many Linuxes, SUN, AIX, ...
dpkg -l| grep -i shell     # Debian Linux
lslpp -l| grep -i shell    # AIX
  #3 (permalink)  
Old 10-10-2008
Levenson Levenson is offline
Registered User
  
 

Join Date: Sep 2008
Location: Kazakhstan, Astana
Posts: 10
grep your_login_name /etc/passwd and look at the end of the line
  #4 (permalink)  
Old 10-10-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,568
look what is installed...
Code:
ls /usr/bin/*sh

e.g. (hpux)
ant:/home/vbe $ ll /usr/bin/*sh
lrwxr-xr-x   1 root       sys             44 Sep 14  2006 /usr/bin/autopush -> /opt/star-ncf-prod/ep_patch/usr/bin/autopush
-r-sr-xr-x   5 root       bin          53248 Apr 28  2007 /usr/bin/chsh
-r-xr-xr-x   1 bin        bin         155648 Oct 10  2007 /usr/bin/csh
-r-xr-xr-x   1 bin        bin            152 Nov 14  2000 /usr/bin/hash
-r-xr-xr-x   1 bin        bin         245760 Nov 14  2000 /usr/bin/keysh
-r-xr-xr-x   2 bin        bin         159744 Oct 10  2007 /usr/bin/ksh
-r-sr-xr-x   1 root       bin          32768 Jan 25  2007 /usr/bin/remsh
-r-xr-xr-x   2 bin        bin         159744 Oct 10  2007 /usr/bin/rksh
-r-xr-xr-x   2 bin        bin         208896 Dec 15  2007 /usr/bin/rsh
-r-xr-xr-x   2 bin        bin         208896 Dec 15  2007 /usr/bin/sh
lrwxr-xr-x   1 root       sys             16 Dec 13  2004 /usr/bin/ssh -> /opt/ssh/bin/ssh
  #5 (permalink)  
Old 10-10-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,710
Note: /usr/bin/hash is not a shell... neither are /usr/bin/ssh, /usr/bin/chsh
  #6 (permalink)  
Old 10-10-2008
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,910
And don't forget /usr/dt/bin/dtksh which is an early version of ksh93 used primarily by CDE
  #7 (permalink)  
Old 10-10-2008
mr_crosby mr_crosby is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 19
echo $SHELL will give you your initial login shell and not your current one.
To find your current shell its
Code:
echo $0
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:18 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0