The Cloud SDK team provides official PPA for the Debian packages to install on Ubuntu systems. Also the Cloud SDK is available in form of Snap package, which allow you to quickly install Google Cloud SDK on Ubuntu system. This tutorial describe you to how to install Google Cloud SDK on Ubuntu 20.04 LTS Linux system.

Prerequisites

Login to your Ubuntu system with a sudo privileged account. Open a terminal and execute the following commands to install required packages on your system.

Install Google Cloud SDK on Ubuntu

Google Cloud SDK can be installed using Apt repository as well as Snap package. Choose one of the below method for installing Google Cloud SDK on Ubuntu 20.04 system. The Snap package doesn’t contain kubectl, So to use kubectl you must use Apt repository installation method.

Method 1 – Using Apt Repository

Follow below steps: That’s it. You have successfully install Google Cloud SDK on your Ubuntu 20.04 Linux system.

Method 2 – Using Snap Package

Google Cloud SDK are available in Snap Store for installing on Linux systems. The Snap daemon is default installed on Ubuntu 20.04. Open a terminal and execute the following command to install Google Cloud SDK using Snap tool on Ubuntu system. This will install google-cloud-sdk on your Ubuntu system. Also upgrade it automatically in background.

Initialize Cloud SDK

After you install Cloud SDK successfully on your system. The next step is to perform initialize the environment with gcloud init command. This authorizes Cloud SDK tools to use your Google account credentials to access Google Cloud and manage it. If you are login with remote shell access, use –console-only to prevent from launching a browser-based authorization. Complete the onscreen instructions to initialize your system. For more details read official instructions to initialize Cloud SDK environment. You can again run gcloud init in future to update Cloud SDK settings or create a new configuration.

Conclusion

This tutorial helped you to install Google Cloud SDK on Ubuntu 20.04 LTS Linux system. Next, you can refer official gcloud comamnd line reference to start working with it.