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.
source share