Installing a Snap package

If you prefer automatic updates, you can install Cloud SDK using a snap package on Ubuntu systems. This package contains the gcloud tool, gcloud alpha, gcloud beta, gsutil, kubectl, anthoscli, docker-credential-gcloud, and bq commands only. It doesn't include kubectl or the App Engine extensions required to deploy an application using the gcloud tool. If you need these components, install the debian package format instead.

  1. At the command line, install the Cloud SDK snap package:
    snap install google-cloud-sdk --classic
  2. Optional. To add Cloud SDK tools to your PATH and enable command completion in your Bash shell, source /path/to/gcloud/completion.bash.inc in your profile.

    For Zsh shells, use /path/to/gcloud/completion.zsh.inc instead.

  3. To initialize the gcloud tool and get started, run gcloud init:
    gcloud init