How do I get current shell?

How do I get current shell?
Answer
To get the name of the current shell, Use
cat /proc/$$/cmdline . And the path to the shell executable by readlink /proc/$$/exe . ps is the most reliable method.
…
  1. $> echo $0 (Gives you the program name. …
  2. $> $SHELL (This takes you into the shell and in the prompt you get the shell name and version.
 

Tìm kiếm

Back
Top