This page shows how to install the Google Cloud SDK, initialize it and run
core gcloud commands from the command-line.
Before you begin
Download the Google Cloud SDK installer.
Launch the installer and follow the prompts.
-
After installation has completed, the installer presents several options:

Make sure that the following are selected:
- Start Google Cloud SDK Shell
- Run 'gcloud init'
The installer then starts a terminal window and runs the
gcloud initcommand.
Troubleshooting tip: If your installation is unsuccessful
due to the find command not being recognized, ensure your PATH
environment variable is set to include the folder containing find. Usually,
this is C:\WINDOWS\system32;.
Initialize the SDK
Use the gcloud init command to perform several common SDK setup tasks. These
include authorizing the SDK tools to access Google Cloud Platform using your
user account credentials and setting up the default SDK configuration.
To initialize the SDK:
-
Run the following at a command prompt:
gcloud init -
Accept the option to log in using your Google user account:
To continue, you must log in. Would you like to log in (Y/n)? Y
-
In your browser, log in to your Google user account when prompted and click Allow to grant permission to access Google Cloud Platform resources.
-
At the command prompt, select a Cloud Platform project from the list of those where you have Owner, Editor or Viewer permissions:
Pick cloud project to use: [1] [my-project-1] [2] [my-project-2] ... Please enter your numeric choice:
If you only have one project,
gcloud initselects it for you. -
If you have the Google Compute Engine API enabled,
gcloud initallows you to choose a default Compute Engine zone:Which compute zone would you like to use as project default? [1] [asia-east1-a] [2] [asia-east1-b] ... [14] Do not use default zone Please enter your numeric choice:
gcloud initconfirms that you have complete the setup steps successfully:gcloud has now been configured! You can use [gcloud config] to change more gcloud settings.
Your active configuration is: [default]
Run core gcloud commands
Run these gcloud commands to view information about your SDK installation:
-
To list accounts whose credentials are stored on the local system:
gcloud auth listgclouddisplays a list of credentialed accounts:Credentialed accounts: - example-user-1@gmail.com (active) - example-user-2@gmail.com
-
To list the properties in your active SDK configuration:
gcloud config listgclouddisplays the list of properties:[core] account = example-user-1@gmail.com disable_usage_reporting = False project = example-project
-
To view information your Cloud SDK installation and the active SDK configuration:
gcloud infogclouddisplays a summary of information about your Cloud SDK installation. This includes information about your system, the installed SDK components, the active user account and current project, and the properties in the active SDK configuration. -
To view information about
gcloudcommands and other topics from the command line:gcloud helpFor example, to view the help for
gcloud compute instances create:gcloud help compute instances creategclouddisplays a help topic that contains a description of the command, a list of command flags and arguments, and examples of how to use it.
What's next
- Read the
gcloudTool Guide for an overview of thegcloudcommand-line tool. - Read the
gcloudReference Guide for descriptions of thegcloudcommands that you can use to perform a variety of tasks on Google Cloud Platform. - Install additional components such as the App Engine emulators or
kubectlusing the Cloud SDK component manager.