Google Cloud SDK is a set of tools that you can use to manage resources and applications hosted on Google Cloud Platform. These include the
bq command line tools. The gcloud command-line tool is downloaded along with the Cloud SDK; a comprehensive guide to the gcloud CLI can be found in gcloud command-line tool overview.
Additionally, the gcloud CLI reference documents all of the gcloud CLI’s functionality.
Install the latest Cloud SDK version (259.0.0)
Cloud SDK is available in package format for installation on Debian and Ubuntu systems. This
package contains the
bq commands only. It does not include
or the App Engine extensions required to deploy an application using
If you want these components, you must install them separately as described
later in this section.
Note: If you are using an instance on Google Compute Engine, Cloud SDK is installed by default. You can still manually install Cloud SDK using the instructions below.
1.Add the Cloud SDK distribution URI as a package source:
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
Note: Make sure you have apt-transport-https installed:
apt-get install apt-transport-https ca-certificates
2. Import the Google Cloud public key:
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key –keyring /usr/share/keyrings/cloud.google.gpg add –
3. Update and install Google Cloud SDK
sudo apt-get update && sudo apt-get install google-cloud-sdk
Note: For additional
apt-get options, such as disabling prompts or dry runs, refer to the
apt-get man pages.
4. Optionally, install any of these additional components:
For example, the
google-cloud-sdk-app-engine-java component can be installed as follows:
sudo apt-get install google-cloud-sdk-app-engine-java
gcloud init to get started: