In this article, we are going to shows that how to Install Google Cloud SDK on Ubuntu 18.04 | 20.04.
Google Cloud SDK (Software Development Kit) is a development toolkit or set of software tools that are helps to manage applications and resources that are hosted on the Google Cloud Platform.
Google Cloud Software Development Kit comes with the gsutil, gcloud, and bq command line tools. These commands are used to managing the resources within the Google Cloud Platform.
Install Google Cloud SDK on Ubuntu 18.04 | 20.04
Simply follow below steps to Install Cloud SDK on Ubuntu 18.04 | 20.04:
Step 1 : Prerequisites
Before installing the Google Cloud package, you will need to install some required packages in your Ubuntu machine. To install them, run the commands below:
sudo apt update
sudo apt install curl apt-transport-https ca-certificates gnupg
Step 2 : Install Google Cloud SDK
In the Ubuntu, you can install Cloud SDK via its official APT repository and via Snap package management.
Method 1 : Install Google Cloud SDK from Official Repository
To install Cloud SDK from Official Repository, add the Cloud SDK distribution URI as a package source using the commands below:
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
After execute above command, now run the command below to 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 -
Next, update and install the cloud SDK:
sudo apt update
sudo apt install google-cloud-sdk
The above command will install Google Cloud SDK on Ubuntu machine.
Method 2 : Install Google Cloud SDK via Snap package management
If Snap is not installed on your system then you will need to install it before install Google Cloud SDK. Installing via snap is the best and easiest way to install packages on Linux machine, including Ubuntu.
To Install snap package manager, run the commands below :
sudo apt update
sudo apt install snapd
Now, run the below command to install Cloud SDK :
sudo snap install google-cloud-sdk --classic
The above command will install Google Cloud SDK on Ubuntu machine from Snap package management .
Step 3 : Initialize Google Cloud SDK
After installing the Google Cloud SDK, you will need to initialize your Google Cloud environment by running the command below:
sudo gcloud init
When you run the command above, it will prompt you to log in to Cloud SDK tools by using your Google account credentials. Press ‘y’ to proceed:
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)? Y
When you press ‘y’, it will display a link for open initialization wizard , copy this link and open it in the browser.

Next, login in Google Cloud SDK via your Google account and follow the initialization wizard to complete the setup.
That’s all
If you face any error and issue in above steps , please use comment box below to report.