A roster of go-to commands for the Google Cloud CLI, the primary command-line tool for Google Cloud.
(Also included: introductory primer, understanding commands, and a printable PDF.)
Cheat sheet
Getting started
Get going with the gcloud CLI.
gcloud init: Initialize, authorize, and configure the gcloud CLI.gcloud version: Display version and installed components.gcloud components install: Install specific components.gcloud components update: Update your gcloud CLI to the latest version.gcloud config set project: Set a default Google Cloud project to work on.gcloud info: Display current gcloud CLI environment details.
Help
gcloud CLI is happy to help.
gcloud help: Search the gcloud CLI reference documents for specific terms.gcloud feedback: Provide feedback to the gcloud CLI team.gcloud topic: Supplementary help material for non-command topics like accessibility, filtering, and formatting.
Personalization
Make the gcloud CLI your own; personalize your configuration with properties.
gcloud config set: Define a property (like compute/zone) for the current configuration.gcloud config get: Fetch the value of a gcloud CLI property.gcloud config list: Display all the properties for the current configuration.gcloud config configurations create: Create a new named configuration.gcloud config configurations list: Display a list of all available configurations.gcloud config configurations activate: Switch to an existing named configuration.
Authorization and Credentials
Grant and revoke authorization to the gcloud CLI and manage credentials.
gcloud auth login: Authorize Google Cloud access for the gcloud CLI with Google Cloud user credentials and set the current account as active.gcloud auth activate-service-account: Authorize Google Cloud access similar togcloud auth loginbut with service account credentials.