Using the Google Cloud SDK installer

Cloud SDK provides an installer for each supported platform. It can be deployed either interactively or non-interactively.

Interactive installation

The installer lets you download, install and set up the latest version of Cloud SDK quickly in an interactive mode. When you run the installer, it downloads Cloud SDK components and installs them on the local system. It also performs additional setup tasks like adding Cloud SDK components to your PATH and enabling command completion in your shell.

Linux
  1. Enter the following at a command prompt:
    curl https://sdk.cloud.google.com | bash
  2. Restart your shell:
    exec -l $SHELL
  3. Run gcloud init to initialize the gcloud environment:
    gcloud init
macOS
  1. Enter the following at a command prompt:
    curl https://sdk.cloud.google.com | bash
  2. Restart your shell:
    exec -l $SHELL
  3. Run gcloud init to initialize the gcloud environment:
    gcloud init
Windows (Installer)
  1. Download the Cloud SDK installer.

    Alternatively, open a PowerShell terminal and run the following PowerShell commands.

    (New-Object Net.WebClient).DownloadFile("https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe", "$env:Temp\GoogleCloudSDKInstaller.exe")
    
    & $env:Temp\GoogleCloudSDKInstaller.exe
          

  2. Launch the installer and follow the prompts. The installer is signed by Google LLC.

    Cloud SDK requires Python 2 with a release version of Python 2.7.9 or higher. The installer will install all necessary dependencies, including the needed Python version, by default. If you already have Python 2.x.y installed and want to use the existing installation, you can uncheck the option to install Bundled Python.

  3. After installation has completed, accept the following options:

    • Start Cloud SDK Shell
    • Run gcloud init

  4. The installer starts a terminal window and runs the gcloud init command.

  5. The default installation does not include the App Engine extensions required to deploy an application using gcloud commands. These components can be installed using the Cloud SDK component manager.
Windows (Zip)

You can also install the latest version from a downloaded .zip file:

  1. Download google-cloud-sdk.zip and extract its contents. (Right click on the downloaded file and select Extract All.)

  2. Launch the google-cloud-sdk\install.bat script and follow the installation prompts.

  3. When the installation finishes, restart the command prompt (cmd.exe).

  4. Run gcloud init:

    C:\> gcloud init

Non-interactive (silent) deployment

Alternatively, you can automate Cloud SDK installation using the installer non-interactively. Follow the installation instructions for interactive installation with these additional flags to suppress prompts:

For Linux:

  • --disable-prompts - disable prompts.

  • --install-dir=DIRECTORY - set the installation root directory to DIRECTORY. The Cloud SDK will be installed in DIRECTORY/google-cloud-sdk. The default is $HOME.

For Windows:

  • /S - install silently. No installer pages are displayed. Use flags to change install settings.
  • /D - set the default installation directory. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. Only absolute paths are supported, for example /D=C:\CloudSDK
  • /allusers - install for all users
  • /singleuser - install for current user (default)
  • /noreporting - disable usage reporting (default is to send usage reporting)
  • /nostartmenu - don't create start menu shortcut (default is to create shortcut)
  • /nodesktop - don't create desktop shortcut (default is to create shortcut)
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud SDK Documentation