Quick Start to Install Google Cloud Cli

2021/11/1·1 min read

This blog shows a quick memo on how to get started with GCP cloud cli.

Install GCP SDK

https://cloud.google.com/sdk/docs/install-sdk

Also, reference here for release note https://cloud.google.com/sdk/docs/release-notes

Install SDK

for Mac OS, double click the ./install.sh to install to the Mac OS.

gcloud init

Run the gcloud init to configure the GCP cloud cli, this will start authentication of the Google. If you have multiple different GCP accounts, you can also use the gcloud init to switch to a different account.

Confirm current GCP setting

gcloud config list

run gcloud config list to check the current GCP account and current GCP project.

run gcloud projects list to view all the projects at the current GCP account.

use gcloud config set project {project id} to set the gcp project id.