Before the installation of the gcloud CLI, confirm that Python 3 is installed. Python 3.5 or higher, 3.7 is recommended.
Follow the following steps to install the Google Cloud CLI:
Download one of the following tarball depending on your hardware name. If you don’t know what your hardware name is, run the uname -m command:
Open the downloaded tar.gz file to extract the content of the tarball at any location (the home directory is recommended).
Note: To replace the existing installation, delete all content of the
google-cloud-sdkdirectory and extract the content in thegoogle-cloud-sdkdirectory.
gcloudFrom the root folder, run the following command to execute the installation script:
./google-cloud-sdk/install.sh
To install google-cloud-cli non-interactively, set all preferences as flags. Use the --help flag with the above command to see all preferences.
Note: Use the
--screen-reader=trueflag with the above command to turn on the screen reader mode while installation.
gcloudUse the following command to initialize the gcloud CLI:
./google-cloud-sdk/bin/gcloud init
gcloud components (optional)Use the following command to install the additional components of gcloud:
gcloud components install [COMPONENT_ID]
For example, use the following command to install the AppCtl component:
gcloud components install appctl
Similarly, update and remove keywords can be used instead of install to update and remove the gcloud components.
Unlock your potential: Google Cloud CLI installation series, all in one place!
To continue your exploration of Google Cloud CLI installation, check out our series of Answers below:
How to install Google Cloud CLI on macOS?
Step-by-step instructions for installing Google Cloud CLI on macOS.
How to install Google Cloud CLI on Windows?
Learn how to set up Google Cloud CLI on Windows for seamless cloud interactions.
How to install Google Cloud CLI on Debian/Ubuntu?
Get the necessary commands to install Google Cloud CLI on Debian/Ubuntu Linux distributions.
How to install Google Cloud CLI on Linux?
Explore the process of setting up Google Cloud CLI on Linux systems for command-line cloud access.
Free Resources