Google Cloud SDK is a software toolset that helps developers and users manage cloud services hosted on the Google Cloud Platform. The packaged toolset contains the gcloud, gsutil, and bq commands and is available in package format for installation on Ubuntu as well as other Linux systems. In Ubuntu, there are multiple ways to install Google Cloud SDK. Ubuntu users can use its official APT repository and also install it from Snap package management. To get started with installing Google Cloud SDK in Ubuntu, follow the steps below:

Prerequisites

Before you can install the cloud package, make sure these packages are installed on Ubuntu. To install them simply run the commands below: After installing the required packages above, continue below to install them.

Install from Official Repository

Google has made available an official repository to install the cloud package. In most cases, you’ll want to install from this repository since Ubuntu will download and install newer packages automatically when available. Add the Cloud SDK distribution URI as a package source by running the commands below: After that, import the Google Cloud public key by running the commands below: Update and install the cloud SDK. Running the commands above will install Google Cloud SDK on Ubuntu. You can now start managing your Google Cloud Platform from your Ubuntu machine.

Install from Snap

If you don’t want to use the method above, you can simply follow the steps below to install it. Google Cloud SDK is available in Ubuntu Snap package management. Snap is available by default on Ubuntu 20.04. However, if you’re using an older version of Ubuntu, you may need to install it. To install Google Cloud SDK via Snap, simply run the commands below: That will install the cloud SDK tools on your machine. The two methods above should work fine, however, installing from Snap is the quickest way.

Initialize Cloud SDK

Either method above will work just fine. Whichever method you use, you’ll have to initialize your environment using the commands below. After installing, run the commands below to initialize the cloud environment. Running the commands above will prompt you to authorize the Cloud SDK tools to use your Google account credentials to access Google Cloud and manage it. Follow the initialization wizard and complete the setup. You’ll have to open the URL link provided and log in via your Google account. Conclusion: This post showed you how to install and set up Google Cloud SDK on Ubuntu. If you find any error above, please use the comment form below to report.