How to install Google Cloud SDK on Linux for easy remote access to your Google Cloud Platform

Interacting with your Google Cloud Platform can be done from the Linux terminal window.

How to install Google Cloud SDK on Linux for easy remote access to your Google Cloud Platform

If you've dipped your toes into the Google Cloud Platform to deploy the likes of a Kubernetes cluster, you might wish you could manage and work with that deployment from your Linux desktop. Doing so would be significantly more efficient than having to work through a browser—especially for those who are accustomed to working from within the command line.

But how do you do that? You can't just secure shell into your Google Cloud Platform account. In order to make this happen, you must install the Google Cloud Software Development Kit. It's actually quite easy to do and will make the task of working with your Google Cloud Platform deployments easier.

SEE: Hybrid cloud: A guide for IT pros (TechRepublic download)

What you'll need

The only things you'll need for this are:

How to install the SDK

The first thing to do is to open a terminal window. Once you have that ready, download the tar file for the SDK with the command:


Next, unpack the file with the command:

tar -zxf google-cloud-sdk-*

Change into the newly created directory with the command:

cd google-cloud-sdk

Install the SDK with the command:


Answer all the questions to complete the installation.

Getting started

The next step is to initialize gcloud with the command:

gcloud init

You will be prompted to visit a link that will then present you with a key to copy and paste into the command line. To successfully do this, you must be logged in to your Google Cloud Platform account on the browser used to retrieve the key. Once you've entered the key into the command line, you can then select the project you want to work with or create a new project. 

After you've initialized the SDK, you can then make sure all the gcloud components are updated with the command:

gcloud components update

It is now possible to install various components. For example, if you want to install kubectl, the command would be:

gcloud components install kubectl

And that's all there is to it. You are now ready to start working with your Google Cloud Platform to manage your various deployments, all from your local Linux command line.

Also see


Image: iStockphoto/artisteer

By Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic, The New Stack, and Linux New Media. He's covered a variety of topics for over twenty years and is an avid promoter of open source. For more news about Jack Wallen, visit his website jackwallen....