在PATH Terraform中设置路径

时间:2019-03-18 08:31:40

标签: linux path terraform

echo $PATH上获得以下我认为不完整的输出 输出:/snap/bin/terraform 如何设置它的正确性,如果它也正确,那么我将无法使用命令terraform init出现以下错误

Command 'terraform' is available in '/snap/bin/terraform'
The command could not be located because '/snap/bin' is not included 
in the PATH environment variable. 
terraform: command not found

1 个答案:

答案 0 :(得分:0)

您不应该在$PATH中添加命令,这样就足以添加其文件夹,如下所示:

export PATH=$PATH:/snap/bin

您可以更新~/.bash_profile~/.profile或其他来保存此更改,具体取决于您使用的外壳。

相关问题