Install and configure Google Cloud command line interface


Before you begin

Ensure that:

  • You have a Google Cloud account
  • You have access to a supported command line environment such as Windows, Linux or Apple OSX.
  • you have installed Python 2.7.9 or later.
    Use python -V to determine the current version of python installed on your system.

Installing the Google Cloud command line interface

The Google Cloud command line interface can be installed in a variety of environments, including MacOS, Linux and Windows.

Important Note


The Google Cloud CLI install process is governed by Google and may change at any moment. This page is meant as a guide. Please consult the Google Cloud CLI documentation for exact details of the command line interface and similar topics.

  1. Open a browser to Google cloud CLI overview page.
  2. In the Install the latest Cloud SDK section section select an appropriate environment.
  3. Execute the download and install Google Cloud CLI as appropriate for for your environment:
    For example on Mac OSX:


    cd ~/Downloads
    tar -xvf

    On Windows 10 using powershell as administrator (note all on a single line, split for ease of review):
    (New-Object Net.WebClient).DownloadFile(
    followed by :
    & $env:Temp\GoogleCloudSDKInstaller.exe

Initializing the Google Cloud environment

You must initialize the Google Cloud CLI

  • After installing the Google Cloud environment, initialize using a command similar to:
    on Mac OSX:
    ./google-cloud-sdk/bin/gcloud init

    On Windows:
    gcloud init


    Under Windows the gcloud init command is typically run to complete required initialization.
    If required open a Google Cloud command window, using the desktop icon, and execute the gcloud init command.