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 94.8 MB c6fdba4cb1551b0da7c1d744eb0dfaf68b59861238d6a6b5ef6bad1ba596b567
    Linux 64-bit

    (Arm)

    google-cloud-cli-linux-arm.tar.gz 90.9 MB af2086c0b506282003f2392d9387d909201d0f64854900f3143f843347528814
    Linux 32-bit

    (x86)

    google-cloud-cli-linux-x86.tar.gz 54.9 MB 751b9ca677abb03b5aa033e62aac36ca17e506039e911566cdbdd0d942d4db5a
    macOS 64-bit

    (x86_64)

    google-cloud-cli-darwin-x86_64.tar.gz 55.0 MB 5a3fbe6fae39b26a4d397a8df383f732ddbbe6a30ede3569e34057598c29c68e
    macOS 64-bit

    (arm64)

    google-cloud-cli-darwin-arm.tar.gz 54.9 MB be292eb43820dbf4b2641f33e225a4ddc0255fe980a91d6fcb93f75e6a7d3e63
    macOS 32-bit

    (x86)

    google-cloud-cli-darwin-x86.tar.gz 53.3 MB 56ead76d432682d98a05145e5f67f72ab07b3d47206115a0f25eea5ebb42f953
    Windows 64-bit

    (x86_64)

    google-cloud-cli-windows-x86_64.zip 105.8 MB 9612ee5a32a13e917fda84a0dce8028264c3fec1e8ca2738d1d43c312c675332
    Windows 64-bit

    (x86_64) with Python bundled

    google-cloud-sdk-594.0.1-windows-x86_64-bundled-python.zip 105.8 MB 9612ee5a32a13e917fda84a0dce8028264c3fec1e8ca2738d1d43c312c675332
    Windows 32-bit

    (x86)

    google-cloud-cli-windows-x86.zip 103.0 MB 8bd7f2c1a525483c694fda6c5c5c7b21a3b348ed8942505ed8d406bcb6c7023f
    Windows 32-bit

    (x86) with Python bundled

    google-cloud-sdk-594.0.1-windows-x86-bundled-python.zip 103.0 MB 8bd7f2c1a525483c694fda6c5c5c7b21a3b348ed8942505ed8d406bcb6c7023f
  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>.