Installing a Snap package

Cloud SDK is available in the snap package format on Ubuntu systems for users that prefer automatic updates. This package contains the gcloud, gcloud alpha, gcloud beta, gsutil, kuberun, anthoscli, docker-credential-gcloud, and bq commands only. It does not include kubectl or the App Engine extensions required to deploy an application using the gcloud command-line tool. If you want these components, you should install the debian package format instead.

  1. Install the Cloud SDK snap package using a command line:
    snap install google-cloud-sdk --classic
  2. Optional. To add Cloud SDK tools to your PATH and enable command completion in your Bash shell, you can do so by sourcing /path/to/gcloud/completion.bash.inc in your profile to enable command completion for the gcloud command-line tool.

    Use /path/to/gcloud/completion.zsh.inc instead for Zsh shells.

  3. Run gcloud init to initialize the gcloud environment and get started:
    gcloud init