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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is grep and how do you use it?

784


What are awk commands?

799


Why is awk called awk?

770


What is the use of sed command in unix?

831


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

843


How do I use nslookup?

762


What is the pipe command?

812


Explain command to view process running?

809


What is used to type command?

750


What is the use of cut command in unix?

948


How does shebang work?

808


Write a command to display a file’s contents in various formats?

847


Is grep faster than awk?

743


Why is shebang used?

802


Name the various commands that are used for the user information in unix.

781