← 返回命令列表

Linux command

gcloud-info 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show SDK information

gcloud info

Show installation path

gcloud info --format='value(installation.sdk_root)'

Show account info

gcloud info --format='value(config.account)'

Output as YAML

gcloud info --format=yaml

说明

gcloud info provides a comprehensive snapshot of the Google Cloud SDK installation and runtime environment. The output includes SDK version, installation directory, Python interpreter location and version, configured account and project, and active configuration name. This information is invaluable for troubleshooting when gcloud commands behave unexpectedly or when seeking help, as it reveals environmental factors that may affect command execution. The --run-diagnostics flag goes further by performing active connectivity tests to Google Cloud services, helping identify network or firewall issues. The --format option allows extracting specific values programmatically, useful for scripts that need to determine installation paths or active configuration settings. The --anonymize flag removes personally identifiable information from the output, making it safe to include in bug reports or support requests without exposing account details.

参数

--format _FORMAT_
Output format: yaml, json, value.
--run-diagnostics
Check connectivity and permissions.
--anonymize
Omit personal information.
--help
Display help information.

FAQ

What is the gcloud-info command used for?

gcloud info provides a comprehensive snapshot of the Google Cloud SDK installation and runtime environment. The output includes SDK version, installation directory, Python interpreter location and version, configured account and project, and active configuration name. This information is invaluable for troubleshooting when gcloud commands behave unexpectedly or when seeking help, as it reveals environmental factors that may affect command execution. The --run-diagnostics flag goes further by performing active connectivity tests to Google Cloud services, helping identify network or firewall issues. The --format option allows extracting specific values programmatically, useful for scripts that need to determine installation paths or active configuration settings. The --anonymize flag removes personally identifiable information from the output, making it safe to include in bug reports or support requests without exposing account details.

How do I run a basic gcloud-info example?

Run `gcloud info` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --format _FORMAT_ do in gcloud-info?

Output format: yaml, json, value.