找出Google Cloud SDK的安装位置 [英] Find out where Google Cloud SDK is installed

查看:73
本文介绍了找出Google Cloud SDK的安装位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在 PATH 中添加Google Cloud SDK.因此,我需要安装位置的路径.是否有任何 gcloud ... 命令可以向我提供此信息?

I need to add the Google Cloud SDK in the PATH. So I need the path to where is installed. Is there any gcloud ... command which gives me this information?

如果没有,我必须通过哪个gcloud 等中的符号链接.

If not I have to go through the symlink in which gcloud, etc.

有没有更清洁的解决方案来解决这个问题?

Any cleaner solution for this problem?

推荐答案

以下命令将为您提供所需的信息:

The following command will give you the information you're looking for:

$ gcloud info --format="value(installation.sdk_root)"
/path/to/google-cloud-sdk/

您需要附加/bin .

您还可以使用许多其他路径: config.paths.global_config_dir installation.sdk_root 等.查看 gcloud info --format = json 的输出,以获取所有要查询的属性.

You also have lots of other paths available: config.paths.global_config_dir, installation.sdk_root, and so on. Look at the output of gcloud info --format=json for all available properties to query.

这篇关于找出Google Cloud SDK的安装位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆