How To Install Google Cloud SDK on Debian 11

Google Cloud Platform is Google’s solution for cloud computing. Now in this post, you will learn how to install the Google Cloud SDK on Debian 11 through a step-by-step guide.

According to Wikipedia:

The Google Cloud Platform offered by Google is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail, Google Drive, and YouTube.

Therefore, this is an enterprise-level solution provided by Google. In this case, it is useful to install the SDK on a Linux system.

Also, Cloud Platform provides the products, services, and tools to be able to design, test, and launch applications on the platform guaranteeing great scalability and security thanks to the design of the infrastructure provided by Google.

So, let’s go for it.

Install Google Cloud SDK on Debian 11

One of the most recommended ways to install is through the repositories provided by Google. So, open a terminal and make sure Debian 11 is up to date.

sudo apt update
sudo apt upgrade

Then, install some packages needed to add the Google repository.

sudo apt install curl apt-transport-https ca-certificates gnupg 

Using the curl command you need to download the GPG key from the repository. And at once we add it to the system.

curl | sudo apt-key add -

Now add the required repository.

echo "deb cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list 

Refresh APT so that the newly added repository is recognized by the system.

sudo apt update 

And now you can install the Google Cloud SDK on Debian 11 by running this command

sudo apt install google-cloud-sdk
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-python google-cloud-sdk-pubsub-emulator google-cloud-sdk-bigtable-emulator
  google-cloud-sdk-datastore-emulator kubectl
Recommended packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
Need to get 75.8 MB of archives.
After this operation, 479 MB of additional disk space will be used.

After entering the password and accepting the installation it will finish successfully.

Running the Google Cloud SDK

If you have installed the SDK on a remote server then you have to start it by running the following command

sudo gcloud init --console-only

Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).

You must log in to continue. Would you like to log in (Y/n)?

This will prevent you from logging in using the web browser.

Otherwise, if you are using the SDK on a GUI computer, you can run the following command

sudo gcloud init

Then you can log in and start working with it.

Removing the Google Cloud SDK on Debian 11

If you decide not to use it anymore, you can remove it from the system to prevent it from filling up disk space.

To uninstall it, just run

sudo apt remove google-cloud-sdk

And it would be convenient to remove the repository from the system as well.

sudo rm /etc/apt/sources.list.d/google-cloud-sdk.list 

To finish the process, refresh APT.

sudo apt update

This way neither the repository nor the SDK will be in the system.


The Google Cloud SDK can open the door for you to work with Google’s technology but adapt it to your own needs. This kind of technology is very useful in many other production environments and the SDK can open the door to it.

So, share this post and help us grow.

Scroll to Top