Google Cloud CLI (gcloud) – Essential Commands for Beginners

What is gcloud?

gcloud is the Google Cloud Command Line Interface (CLI). It lets you manage your Google Cloud resources directly from the Terminal instead of using the web console.

You can use gcloud to:

  • Create and manage projects
  • Enable APIs
  • Deploy applications
  • Manage virtual machines
  • Work with Cloud Run
  • Configure billing
  • Create service accounts
  • Manage AI services such as Gemini

Numbered gcloud Commands

1. Check whether gcloud is installed

gcloud --version

Displays the installed Google Cloud SDK version.


2. Update gcloud

gcloud components update

Updates the Google Cloud SDK to the latest version.


3. Sign in

gcloud auth login

Opens your browser so you can sign in with your Google account.


4. List authenticated accounts

gcloud auth list

Shows every Google account currently authenticated.


5. Change active account

gcloud config set account your-email@gmail.com

Sets the active Google account.


6. List projects

gcloud projects list

Displays every project you have access to.


7. Set the active project

gcloud config set project PROJECT_ID

Sets the active Google Cloud project.

Example:

gcloud config set project kiaapp-agent

All future commands use this project.


8. Show current project

gcloud config get-value project

Displays the currently selected project.


9. Describe a project

gcloud projects describe PROJECT_ID

Shows detailed information about a project.


10. Check billing status

gcloud billing projects describe PROJECT_ID

Shows whether billing is enabled for the project.


11. List billing accounts

gcloud billing accounts list

Displays available billing accounts.


12. Enable an API

gcloud services enable API_NAME

Enables a Google Cloud service.

Example:

gcloud services enable aiplatform.googleapis.com

Enables the Vertex AI API.


13. List enabled APIs

gcloud services list

Shows APIs enabled in the current project.


14. List all available APIs

gcloud services list --available

Lists every Google Cloud API available for use.


15. List configurations

gcloud config configurations list

Shows all saved gcloud configuration profiles.


16. Show current configuration

gcloud config list

Displays the active configuration settings.


17. Create a configuration

gcloud config configurations create my-config

Creates a new configuration profile.


18. Activate a configuration

gcloud config configurations activate my-config

Switches to another configuration.


19. Deploy an application

gcloud run deploy

Deploys your application to Cloud Run.


20. List Cloud Run services

gcloud run services list

Displays deployed Cloud Run services.


21. Delete a service

gcloud run services delete SERVICE_NAME

Deletes a Cloud Run service.


22. List virtual machines

gcloud compute instances list

Displays Compute Engine virtual machine instances.


23. Create a virtual machine

gcloud compute instances create VM_NAME

Creates a new Compute Engine virtual machine.


24. List Cloud Storage buckets

gcloud storage buckets list

Displays Cloud Storage buckets.


25. Create a Cloud Storage bucket

gcloud storage buckets create gs://BUCKET_NAME

Creates a new Cloud Storage bucket.


26. List service accounts

gcloud iam service-accounts list

Displays all service accounts in the project.


27. Create a service account

gcloud iam service-accounts create NAME

Creates a new service account.


28. Enable the Vertex AI API

gcloud services enable aiplatform.googleapis.com

Enables Vertex AI so you can use AI models such as Gemini.


29. Check the active project before using Gemini

gcloud config get-value project

Confirms that Gemini requests will use the correct Google Cloud project.


30. Show general help

gcloud help

Displays general help for the gcloud command-line tool.


31. Show Compute Engine help

gcloud compute --help

Displays all Compute Engine commands and their usage.


32. Show Cloud Run help

gcloud run --help

Displays all Cloud Run commands and their usage.


33. Print current SDK information

gcloud info

Displays Google Cloud SDK installation details, environment information, and the active configuration.