Ubuntu

How to Install Google Cloud SDK on Ubuntu 22.04?


The Google Cloud SDK (Software Development Kit) contains various tools which are used to manage the applications hosted on Google Cloud using the terminal interface. The feature of the Google Cloud SDK is that it provides you with the different Cloud SDKs depending on different programming languages such as JAVA and Python which help the users to access and manage the Google API in the programming language of their choice.

This article will help us to understand the installation method of the Google Cloud SDK on Ubuntu 22.04 using the command line interface.

How to install Google Cloud SDK on Ubuntu 22.04

The Google Cloud SDK required a Python 3 so before going towards the installation of the Google Cloud SDK, we will confirm the installed version of Python on Ubuntu:

$ python3 --version

When it confirms that the Python3 is installed, we will download the installation package of the Google Cloud SDK on Ubuntu 22.04 using the wget command:

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

Next step is to unzip the downloaded package of the Google Cloud SDK using the tar utility:

$ tar -xf google-cloud-sdk-381.0.0-linux-x86_64.tar.gz

Now, we will run the “install.sh” file in the “google-cloud-sdk” directory:

./google-cloud-sdk/install.sh

It will ask us whether we want to help the Google Cloud CLI, type “y” and press the ENTER key:

Again type the “y” in the next query to add the $PATH and enable the shell command completion:

To launch the Google Cloud SDK, use the command:

$ ./google-cloud-sdk/bin/gcloud init

You will ask for the Google account credentials, when provided, you will log in to the “gcloud CLI”:

Conclusion

Using the Google Cloud SDK is a set of tools through which we can manage our Google Cloud platform resources and applications. In this write-up, we have discovered the method of the installation of the Google Cloud SDK on the latest version of Ubuntu 22.04.

About the author

Hammad Zahid

I'm an Engineering graduate and my passion for IT has brought me to Linux. Now here I'm learning and sharing my knowledge with the world.