Installing from versioned archives

The gcloud CLI provides downloadable, versioned archives for each release. Each versioned archive contains a self-contained installation of the gcloud CLI in a directory named google-cloud-sdk that can be copied to any location on your file system.

Best uses for installing from versioned archives

Versioned archives are designed for non-interactive installation of specific versions of the gcloud CLI and are useful when:

  • You require a specific version of the gcloud CLI. For example:

    • You're scripting with the gcloud CLI or another gcloud CLI component and want to make sure that your scripts don't break as the result of a gcloud CLI update.
    • You're using the gcloud CLI as part of a CI (continuous integration) process or production system where you want to control your dependencies in order to ensure compatibility between parts of the system.
    • You're performing automated deployments of the gcloud CLI to many machines that must be in sync.
    • You're behind a proxy or firewall that requires additional configuration to be able to access the internet.
  • You don't want to perform an interactive installation.

Installation instructions

To install the latest release of the gcloud CLI from a versioned archive:

  1. Check which version (64-bit or 32-bit) your OS is running on.

    • Linux / macOS: Run getconf LONG_BIT from your command line
    • Windows: Control Panel> System> System Type

    Additionally, for macOS, to check your machine hardware name (x86_64, arm64, or x86), run uname -m .

  2. Download the appropriate archive compatible with your version:

    Platform Package Size SHA256 Checksum
    Linux 64-bit

    (x86_64)

    google-cloud-cli-linux-x86_64.tar.gz 150.2 MB 8ba7e746ca05f225e5a73952bbc03f4086a5f65fd94f3717df6f75f212587159
    Linux 64-bit

    (Arm)

    google-cloud-cli-linux-arm.tar.gz 56.8 MB b16b40076503a2c07d0d60b67e126e39a02114029bcabdf4cf9eee96d8e5c55f
    Linux 32-bit

    (x86)

    google-cloud-cli-linux-x86.tar.gz 56.8 MB 3d5a46d0ce90845a87ca2c73930fc73b779744fd4b94b64c2c5e19c5c5aa67c7
    macOS 64-bit

    (x86_64)

    google-cloud-cli-darwin-x86_64.tar.gz 56.9 MB 60bc5dff80c4fbe52551294d9e85063bad76e6c6e27029727998fe81f6f872dd
    macOS 64-bit

    (arm64)

    google-cloud-cli-darwin-arm.tar.gz 56.8 MB 553ef5ba5a642e9704d5c3e3f45129d52df798d72e23d75f8feaf9ddc11bc52b
    macOS 32-bit

    (x86)

    google-cloud-cli-darwin-x86.tar.gz 55.4 MB 3eeabd775fb55adbf557deced14366a481e111b7f26754b627616d9fb457b234
    Windows 64-bit

    (x86_64)

    google-cloud-cli-windows-x86_64.zip 78.0 MB a0f87d5306363bff7f28fab93bff21a3609af0eef4521fe8a1c345eb9be90e31
    Windows 64-bit

    (x86_64) with Python bundled

    google-cloud-sdk-538.0.0-windows-x86_64-bundled-python.zip 101.4 MB 9293f2eebd9619544d81cbb47d06586f8e7886b209c7c8fa0b7fcdde1bf1c017
    Windows 32-bit

    (x86)

    google-cloud-cli-windows-x86.zip 77.9 MB f4a7ad37799cd70d9a0c99797b8d56a26fdfe080189699910ec6701faff1ec45
    Windows 32-bit

    (x86) with Python bundled

    google-cloud-sdk-538.0.0-windows-x86-bundled-python.zip 99.0 MB d8ac9d0afb1133294ffddef3dcaac678c08ba2421d47c77462d45a25cef7a001
  3. Extract the contents of the file to any location on your file system. Preferably, this is your Home folder.

  4. To add the gcloud CLI tools to your path, run the install script from the root of the folder you extracted. Running this script also generates instructions to enable command completion in your bash shell (Linux and macOS only) and enable usage reporting.

    • On Linux or macOS:

       ./google-cloud-sdk/install.sh 
      

      To run the install script with screen reader mode turned on:

       ./google-cloud-sdk/install.sh --screen-reader=true 
      
    • On Windows:

       .\google-cloud-sdk\install.bat 
      

    Run install.sh --help or install.bat --help for a list of flags you can pass to this script, including those that can run the installation non-interactively.

  5. To initialize the gcloud CLI, run gcloud init :

    • For Linux or macOS:

       ./google-cloud-sdk/bin/gcloud init 
      
    • For Windows:

       .\google-cloud-sdk\bin\gcloud init 
      

Previous versions

Previous versions of the gcloud CLI are available in the download archive in Cloud Storage. They are directly accessible through https://storage.googleapis.com/cloud-sdk-release/<archive_name> .

Try it for yourself

If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.

Get started for free
Create a Mobile Website
View Site in Mobile | Classic
Share by: