Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 835
cade galt Avatar asked Sep 06 '25 03:09

cade galt


1 Answers

You can use

which -a bash

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


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!