[英]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. 我在这里从事本教程的工作,我想知道路径,因此可以将其作为最佳做法放在顶层的shell脚本中。
I was told this is not accurate: 有人告诉我这不正确:
echo "$SHELL"
What is the correct way to determine the path to the interpreter for shell scripts? 确定shell脚本解释器路径的正确方法是什么?
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. 列出当前用户指向bash程序的所有路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.