How to install Google Cloud SDK on Ubuntu 20.04

The Google Cloud SDK provides users with the ability to access Google Cloud via Terminal. This is a development toolkit that comes with many commands to help manage resources in Google Cloud environment.

This guide will show you how to download and install Google Cloud SDK on Ubuntu 20.04.

Condition : 

Here are the prerequisites for continuing to install the Google Cloud SDK on Ubuntu 20.04:

  1. You should install Python on your Linux system (Python is installed by default on Ubuntu)
  2. You will be able to download packages over the Internet.

Install Google Cloud SDK on Ubuntu 20.04

To install the Google Cloud SDK on Ubuntu 20.04 via Terminal, you will have to follow the steps mentioned below:

Step 1: Update the package cache

With that said, you'll install the Google Cloud SDK through the Terminal, so launch Terminal by clicking on its icon. The terminal of Ubuntu 20.04 is shown in the following figure:

How to install Google Cloud SDK on Ubuntu 20.04 Picture 1How to install Google Cloud SDK on Ubuntu 20.04 Picture 1

It is recommended that you do this step before proceeding with the installation so that you do not encounter any problems when installing the Google Cloud SDK. You must update your Ubuntu system with the command below:

sudo apt update

When all the required packages have been updated in the system, the Terminal will display the following output:

How to install Google Cloud SDK on Ubuntu 20.04 Picture 2How to install Google Cloud SDK on Ubuntu 20.04 Picture 2

Step 2: Download Google Cloud SDK

Now, the first thing you need to do is download the Google Cloud SDK by running the command below in Terminal Ubuntu:

wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-307.0.0-linux-x86_64.tar.gz

Once the Google Cloud SDK has been downloaded successfully, you should be able to see the following output on your Terminal window:

How to install Google Cloud SDK on Ubuntu 20.04 Picture 3How to install Google Cloud SDK on Ubuntu 20.04 Picture 3

Step 3: Extract the Google Cloud SDK file

Now, you need to extract the Google Cloud SDK file to be downloaded. This can be easily done by running the following command in Terminal Ubuntu:

tar –xvzf google-cloud-sdk-307.0.0-linux-x86_64.tar.gz

Successfully extracting the downloaded file will display the following output in a Terminal window:

How to install Google Cloud SDK on Ubuntu 20.04 Picture 4How to install Google Cloud SDK on Ubuntu 20.04 Picture 4

Step 4: Install Google Cloud SDK

Now, you need to navigate to the newly downloaded Google Cloud SDK folder by executing cd command in Terminal like so:

cd google-cloud-sdk

Once in the Google Cloud SDK directory, you should be able to verify its path on the Terminal like so:

How to install Google Cloud SDK on Ubuntu 20.04 Picture 5How to install Google Cloud SDK on Ubuntu 20.04 Picture 5

Finally, you need to install the Google Cloud SDK script using the command below:

./install.sh

During the installation of this command, you will be asked to provide feedback to improve the overall environment of the Google Cloud SDK.

You can provide this feedback by typing 'Y' into Terminal, however, if you want to continue the installation immediately without giving any feedback, type 'N' into Terminal and press the key Enter.

How to install Google Cloud SDK on Ubuntu 20.04 Picture 6How to install Google Cloud SDK on Ubuntu 20.04 Picture 6

After doing this, you will also be asked if you are sure to continue with the Google Cloud SDK installation. All you have to do is type 'Y' to continue.

You will now be asked to provide a link to include Google Cloud CLIs in your environment. You can choose to continue with the path provided by default or you can provide the path of your choice.

In this example, the post chooses to follow the path provided by default, so just leave that position blank and press the Enter key .

Once Google Cloud SDK has been successfully installed on your Ubuntu system, Terminal will display the following result on it:

How to install Google Cloud SDK on Ubuntu 20.04 Picture 7How to install Google Cloud SDK on Ubuntu 20.04 Picture 7

By following the steps discussed in this article, users can easily install the Google Cloud SDK on Ubuntu 20.04.

All you need to do is take care of the mentioned conditions and correctly execute all the steps. This entire process will take about 7 to 10 minutes to complete.

3.9 ★ | 7 Vote