We will go through setting up the GCloud command line tool (CLI) in this lesson.
- Prerequisite: Create an account on Google Cloud if you don't have one.
For example, on Ubuntu:
$ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list $ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - $ sudo apt install google-cloud-cli
You can quickly verify the installation:
$ gcloud --version Google Cloud SDK 384.0.1 alpha 2022.05.04 beta 2022.05.04 bq 2.0.74 bundled-python3-unix 3.8.11 core 2022.05.04 gsutil 5.10
GCloud CLI Configuration
$ gcloud init Your current configuration has been set to: [default] ... You must log in to continue. Would you like to log in (Y/n)? y ...
Note that you need to have at least one project and enable billing before you can use google cloud.