2017-07-15 145 views
1

https://cloud.google.com/sdk/docs/quickstart-mac-os-x安装Google Cloud SDK,rc文件的路径是什么?

我下载的焦油,并运行install.sh

接下来,我得到这个消息,但是我没有看到任何RC/rc文件?

To update your SDK installation to the latest version [162.0.1], run: 
$ gcloud components update 


Modify profile to update your $PATH and enable shell command 
completion? 

Do you want to continue (Y/n)? y      

The Google Cloud SDK installer will now prompt you to update an rc 
file to bring the Google Cloud CLIs into your environment. 

Enter a path to an rc file to update, or leave blank to use 
[/Users/leongaban/.zshrc]: 

enter image description here

回答

3

莱昂,云SDK安装程序为您提供一个选项更新$PATH以及安装壳完成在云SDK命令。这是通过在您的shell启动脚本中添加几行(通常称为rc文件)完成的。

  • 由于您选择y这一步向前走,安装程序要求为rc文件(即shell启动脚本)的位置。
  • 它检测到您使用zsh,因此它给你默认的选项来更新这个文件/Users/leongaban/.zshrc
  • 反之,如果你使用bash你必须指定类似/Users/leongaban/.bashrc

你也可以在上一步选择n和更新$PATH和/或壳完成手动过。

+0

嗯,我看到它在我的zsh配置'export GOOGLE_SDK_PATH =“/ Users/leongaban/projects/GoogleSDK”' –