Visit Our UNIX and Linux User Community


How do I know what type of shells are available in my Unix system?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How do I know what type of shells are available in my Unix system?
# 1  
Old 10-10-2008
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  
Old 10-10-2008
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  
Old 10-10-2008
grep your_login_name /etc/passwd and look at the end of the line
# 4  
Old 10-10-2008
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  
Old 10-10-2008
Note: /usr/bin/hash is not a shell... neither are /usr/bin/ssh, /usr/bin/chsh
# 6  
Old 10-10-2008
And don't forget /usr/dt/bin/dtksh which is an early version of ksh93 used primarily by CDE
# 7  
Old 10-10-2008
echo $SHELL will give you your initial login shell and not your current one.
To find your current shell its
Code:
echo $0

 

Previous Thread | Next Thread
Test Your Knowledge in Computers #100
Difficulty: Easy
Unix has built-in networking functions so that computers can easily exchange computer data.
True or False?

10 More Discussions You Might Find Interesting

1. Programming

UNIX shells scripting

Can someone help by advising hw to built myself strong on logic building in UNIX shell scripting. I find it very difficult Sent from my iPhone using Tapatalk (4 Replies)
Discussion started by: Vijaykannan T
4 Replies

2. UNIX for Advanced & Expert Users

how to findout the file system type?

Hi all, How to findout the file sytem type which is NFS and which is Local? Suppose i have 5 different folders my in Root directory. dir 4 and 5 are mounted on different file system and dir 1,2 and 3 are mounted on different fild system Now i wanted know which file sytem is Local and which... (1 Reply)
Discussion started by: psiva_arul
1 Replies

3. Red Hat

File system type

Hi all, How to find out what type of file system is my system configured for Red hat linux 8.0 ? whether it is NTFS or FAT32 or FAT16... Can somebody help me on this? Regards, William (4 Replies)
Discussion started by: William1482
4 Replies

4. UNIX for Dummies Questions & Answers

changing shells in unix (im using putty)

hi. im new here. im taking a UNIX OS class and im in need of some help how do i change my shell in UNIX? for homework i need to edit the tcshrc file (to include aliases) in my home directory but its not there. so i think switching shells will create the file. am i correct? I'm using PuTTy.... (1 Reply)
Discussion started by: alpha_centauri
1 Replies

5. Shell Programming and Scripting

Different type of shells?

Hello there, i just want to know what are the different type of shells and the main difference betwee them. The problem is that if you try to search over the net you will find a lot of information and hence you will have no enough time to read all of them.....Anyone can help with this?? (1 Reply)
Discussion started by: charbel
1 Replies

6. HP-UX

more than one fs type on the same file system

hi is it possible to have more than one file system types on the same file system. if yes then how do we do it, can veritas be used to achieve this (1 Reply)
Discussion started by: livemyway
1 Replies

7. Shell Programming and Scripting

Switching shells in UNIX Scripts

Solaris Newbie here to scripting in UNIX/SOLARIS. What I am looking to do is, once the script is executed, switch to /bin/bash shell and continue to execute the script. The problem I run into is once the script switches to the Bash shell, the script stops, and does not execute the... (2 Replies)
Discussion started by: Scoobiez
2 Replies

8. UNIX for Dummies Questions & Answers

Good Unix Shells ?

Hey Guys i am new to Unix and i have downlaoded Cygwin for Windows and deleted it. I was just wondering is there any good shells like that for windows that just as good thanks for your time ][ce (1 Reply)
Discussion started by: IceCold
1 Replies

9. Shell Programming and Scripting

perl as lanuage of shells in unix

hi, do shells in unix understand the language of perl? learning perl will make u a ultimate shell programmer? thanks (6 Replies)
Discussion started by: yls177
6 Replies

10. Shell Programming and Scripting

Different type of Shells

Hello every body iam new to UNIX and shell scripting and i would like to know the different type of shells. And also i would like to know the reason for Shell scripts And tell me which will be the best site for UNIX beginners. Regards Sivam. :rolleyes: (5 Replies)
Discussion started by: sivhard
5 Replies

Featured Tech Videos