Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the command to find out which shell you are running?

Answers were Sorted based on User's Feedback



what is the command to find out which shell you are running?..

Answer / dipayan

echo $SHELL

will show that

Is This Answer Correct ?    58 Yes 11 No

what is the command to find out which shell you are running?..

Answer / abdullah

Hi folks,

The best answer is echo $0

# echo $SHELL
/bin/bash
#csh
# echo $SHELL
/bin/bash


But, when using echo $0:
[root@abdullah /]# echo $0
-bash
# csh
# echo $0
csh

Is This Answer Correct ?    29 Yes 3 No

what is the command to find out which shell you are running?..

Answer / satya

echo $SHELL---It will shows which shell u r currently
running.

Is This Answer Correct ?    30 Yes 13 No

what is the command to find out which shell you are running?..

Answer / abhilash s thachil

ps is not the correct answer. ps just lists out the running processes.
echo $SHELL will just print the value in environment variable SHELL which is your default shell.

Correct answer is echo $0

This will print current shell even after you change your shell from a running shell.

- Abhilash S Thachil

Is This Answer Correct ?    13 Yes 2 No

what is the command to find out which shell you are running?..

Answer / rajhshekhar aletty

ps This command displays your current SHELL and your default
SHELL also.

Is This Answer Correct ?    16 Yes 6 No

what is the command to find out which shell you are running?..

Answer / unix admin

'Rajhsekhar', 'Swapna' and 'Abdullah' these 3 users
answers also right 100% look at the following example:
using "ps"

/usr/users/operator=>ps
PID TTY S TIME CMD
1683270 pts/0 S 0:00.24 -ksh (ksh)
[operator] AT:/usr/users/operator=>sh
[operator] AT:${PWD}=>ps
PID TTY S TIME CMD
1683270 pts/0 S 0:00.24 -ksh (ksh)
1715181 pts/0 S + 0:00.01 sh
[operator] AT:${PWD}=>


using "echo $0"

/usr/users/operator=>echo $0
-ksh
/usr/users/operator=>sh
[operator] AT:${PWD}=>echo $0
sh
[operator] AT:${PWD}=>

Is This Answer Correct ?    8 Yes 1 No

what is the command to find out which shell you are running?..

Answer / harish

ps lists all the processes running not the shell type.
echo $shell can be used to find out the shell running.

Is This Answer Correct ?    31 Yes 27 No

what is the command to find out which shell you are running?..

Answer / subbareddy kake

All answers correct, except 'Swapna' and 'Rajhsekhar'
answers.By using ps cammand we can see what are the process
are running.So may be few process are running in b shell
remaining process are are running on C shell.So we can't
say.

Best answer is

echo $SHELL

Is This Answer Correct ?    13 Yes 9 No

what is the command to find out which shell you are running?..

Answer / padma narravula

ps | grep "$$"

Is This Answer Correct ?    1 Yes 0 No

what is the command to find out which shell you are running?..

Answer / asit pal

[Admin@RSPC985 Asit]$ which $SHELL
/bin/bash

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More Unix Commands Interview Questions

what is the difference between SED and GREP ? Which one is more better and why?

4 Answers   IBM,


What is the command to compare two files in unix?

0 Answers  


What is Unix, and how does it differ from other operating systems?

2 Answers  


distinguish between multi-tasking,multi-user,multi- processing and time sharing?

4 Answers   Infosys, Nikhil Construction,


How i'll delete a particular line from the file? Please give answer as soon as possible. Thanks in advance.

12 Answers   IBM,


Which is the command used to find out currently executing Process in UNIX?

6 Answers   Amazon,


which command is used to identify the type of the file?

3 Answers  


How to replace the exact word in vi editor?? suppose a file contains words like amaze,amazed,amazement in some of the line.But i want to replace only 'amaze' with delight but don't wanna replace amazed or amazement. thanks

6 Answers   Polaris, Tech Mahindra,


What are the general commands in using unix os for a beginner?

0 Answers  


How do you create a directory in UNIX?

1 Answers  


what are wild cards?

2 Answers  


How can i know my Filesystem and its current usage in my prod UNIX system?

4 Answers   HCL, IBM,


Categories