Stay organized with collections
Save and categorize content based on your preferences.
Install the Google Cloud CLI
This quickstart describes the recommended method to install and initialize the
Google Cloud CLI. After initialization, run a few core
gcloud CLI commands to view information about your installation
and verify it was successful.
To follow step-by-step guidance for this task directly in the
Google Cloud console, click Guide me:
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Roles required to select or create a project
Select a project: Selecting a project doesn't require a specific
IAM role—you can select any project that you've been
granted a role on.
Create a project: To create a project, you need the Project Creator role
(roles/resourcemanager.projectCreator), which contains the
resourcemanager.projects.create permission. Learn how to grant
roles.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Roles required to select or create a project
Select a project: Selecting a project doesn't require a specific
IAM role—you can select any project that you've been
granted a role on.
Create a project: To create a project, you need the Project Creator role
(roles/resourcemanager.projectCreator), which contains the
resourcemanager.projects.create permission. Learn how to grant
roles.
Confirm that you have a supported version of Python. The Google Cloud CLI requires
Python 3.10 to 3.14. The x86_64 Linux package includes
a bundled Python interpreter that will be preferred by default. For
information on how to choose and configure your Python interpreter, see the
gcloud topic startup documentation.
You can also perform the installation non-interactively by providing flags.
To view available flags, run:
./google-cloud-sdk/install.sh--help
Optional: If you updated your PATH in the previous step, open a new
terminal so that the changes take effect.
Debian/Ubuntu
Package contents
The gcloud CLI is available in package format for installation on Debian and Ubuntu
systems. This package contains the gcloud, gcloud alpha,
gcloud beta, gsutil, and bq command-line tools only. It
doesn't include kubectl or the App Engine extensions required to deploy an
application using gcloud commands. If you want these components, you must
install them separately.
Before you begin
Before you install the gcloud CLI, make sure that your operating system meets the
following requirements:
It is an Ubuntu release that hasn't reached
end-of-life or a Debian stable
release that hasn't reached
end-of-life.
It has recently updated its packages. To do this now, run the following command:
sudoapt-getupdate
It has ca-certificates, gnupg,
and curl installed. To install these packages, run the following command:
sudoapt-getinstallca-certificatesgnupgcurl
Installation
Import the Google Cloud public key.
For newer distributions (Debian 9+ or Ubuntu 18.04+) run the
following command:
The ten most recent releases are always available in the repo. For releases prior to 371.0.0,
the package name is google-cloud-sdk
Red Hat/Fedora/CentOS
Package contents
The gcloud CLI is available in package format for installation on
Red Hat Enterprise Linux 7, 8, 9, and 10; Fedora 41 and 42; and CentOS 7 and 8 systems.
This package contains the
gcloud, gcloud alpha, gcloud beta, gsutil, and
bq commands only. It doesn't include kubectl or the App Engine
extensions required to deploy an application using gcloud commands, which can be
installed separately as described later in this section.
Installation
Update DNF with gcloud CLI repository information.
The following sample command is for a Red Hat Enterprise Linux 7, 8, or 9-compatible
installations, but make sure that you update the settings as needed for your
configuration:
For ARM64 (aarch64) installations, use
https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-aarch64
(RHEL 7, 8, or 9-compatible) or
https://packages.cloud.google.com/yum/repos/cloud-sdk-el10-aarch64
(RHEL 10-compatible) as the baseurl value.
Install libxcrypt-compat.x86_64.
sudodnfinstalllibxcrypt-compat.x86_64
Install the gcloud CLI:
sudodnfinstallgoogle-cloud-cli
Note: If you haven't moved to
dnf
on your system, you can run these commands using yum instead.
You can also use dnf/yum options, such as disabling prompts or dry runs, with the
provided commands.
Launch the installer and follow the prompts. The installer is signed by Google LLC.
If you're using a screen reader, check the Turn on screen reader mode checkbox. This
option configures gcloud to use status trackers instead of unicode spinners,
display progress as a percentage, and flatten tables. For more information, see the
Accessibility features guide.
Google Cloud CLI requires Python; supported versions are Python 3.10 to 3.14. By
default, the Windows version of Google Cloud CLI comes bundled with Python 3. To use
Google Cloud CLI your operating system must be able to run a supported version of Python.
The installer installs all necessary dependencies, including the needed Python version.
While Google Cloud CLI installs and manages Python 3 by default, you can use an existing
Python installation if necessary by unchecking the option to Install Bundled Python.
See gcloud topic startup to
learn how to use an existing Python installation.
After installation is complete, the installer gives you the option to create Start Menu
and Desktop shortcuts, and start the Google Cloud CLI shell. Uncheck the option to start
the shell. You will run and configure the gcloud CLI in the next steps.
Troubleshooting tips
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;.
If you uninstalled the gcloud CLI, you must reboot your
system before installing the gcloud CLI again.
If unzipping fails, run the installer as an administrator.
The ten most recent releases are available in the repository. For releases prior to 371.0.0, use google-cloud-sdk as the
package name.
Initialize and authorize the gcloud CLI
If you are behind a proxy or firewall, see
Proxy configuration to enable
network access for the gcloud CLI.
After you install the gcloud CLI, initialize it to authorize
access to Google Cloud and set up a default configuration. For more
information, see gcloud init.
Run gcloud init to initialize the gcloud CLI:
gcloudinit
By default, this command opens a web browser to authorize access. To
authorize from the command line instead, add the --console-only flag.
For non-interactive authorization,
create a service account with the
appropriate scopes in the Google Cloud console, and then
use gcloud auth activate-service-account
with its JSON key file.
Follow the prompts to authorize and configure:
When prompted to sign in, accept and then sign in to your Google Account
in your browser. Click Allow to grant permission to access
resources.
From the list of projects for which you have Owner, Editor, or
Viewer permissions, select a project. If you have only one project,
gcloud init selects it for you.
If you have more than 200 projects, you are prompted to enter a project
ID, create a project, or list projects. If you choose to create a
project, you must also
enable billing on it.
If you have the
Compute Engine API
enabled, select a default Compute Engine zone.
Optional: For an improved screen reader experience, enable the
accessibility/screen_reader property with the following command:
View information about gcloud commands and other topics:
gcloud help
For example, to view the help for gcloud compute instances create:
gcloud help compute instances create
The gcloud CLI displays a help topic that contains a
description of the command, a list of command flags and arguments, and
examples of how to use the command.
Optional: Install additional components
To install additional components, such as the App Engine emulators, kubectl,
or gcloud CLI commands at the alpha or beta release level, see
Managing gcloud CLI components.
What's next
Read the gcloud CLI guide for an overview of
the gcloud CLI, including a quick introduction to key
concepts, command conventions, and helpful tips.
Read the gcloud CLI reference guide
for detailed pages on each gcloud CLI command, including
descriptions, flags, and examples, that you can use to perform a variety of
tasks on Google Cloud.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-09 UTC."],[],[]]