What shell am I in?

后端 未结 8 1090
情歌与酒
情歌与酒 2020-12-14 14:51

Is there a command to identify the name/type of current shell, the path to the shell binary, and the version of the shell?

I don\'t need all of that, but the more I

8条回答
  •  盖世英雄少女心
    2020-12-14 15:07

    Try ($$ is shell variable set to process id of the shell):

    ps -ef | grep $$
    

    or try this (/proc/self is aloso process id of the shell):

    ps -ef | grep /proc/self
    

    As regards to "-bash" - dash means it's login shell. Type bash again and now you'll see that the shell is just "bash" (without dash)

提交回复
热议问题