简体   繁体   中英

How can I determine the interpreter that runs my bash shell?

I was working on this tutorial here and I want to know the path so I can put it in my shell scripts on the top line as is good practice.

I was told this is not accurate:

echo "$SHELL"

What is the correct way to determine the path to the interpreter for shell scripts?

This is a shared hosting account and it is not obvious where it is located.

This is a follow up to a similar but not duplicate here .

You can use

which -a bash

to list all paths for the current user that point to a bash program.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM