Find out where the Google Cloud SDK is installed

I need to add the Google Cloud SDK in PATH . Therefore, I need a path to the installation site. Is there any gcloud ... command that gives me this information?

If not, I need to go through a symbolic link in which gcloud , etc.

Any solution to solve this problem?

+5
source share
2 answers

The following command will provide you with the information you are looking for:

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

You need to add /bin .

You also have many other paths available: config.paths.global_config_dir , installation.sdk_root , etc. Look at the output of gcloud info --format=json for all available properties for the request.

+15
source

I used:

 dirname $(which gcloud) 

And worked like a charm

+1
source

Source: https://habr.com/ru/post/1236820/


All Articles