☁️
Cloud CLI

Google Cloud CLI

Manage Google Cloud Platform from your terminal

🐧 Linux🍎 Mac🪟 Windows
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

What is this?

The Google Cloud CLI lets you create VMs, buckets, and Kubernetes clusters on GCP from your terminal.

📁

Config files for Google Cloud CLI

Where to create or edit the main configuration — paths below match the setup steps.

  • ~/.config/gcloud/

    Location: User home

    GCP credentials and active project

📥

Step 01

Install Google Cloud CLI

(01)Install Google Cloud CLI

Linux
1# Debian/Ubuntu
2curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
3echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list
4sudo apt-get update && sudo apt-get install -y google-cloud-cli
⚙️

Step 02

Configure Google Cloud CLI

(01)Configure Google Cloud CLI

Linux
1gcloud init
2gcloud auth login
3gcloud config set project YOUR_PROJECT_ID

Step 03

Verify

(01)Verify installation

Linux
1gcloud --version
2gcloud projects list