gcloud examples, explained
$ gcloud compute instances list --project my-proj --zone us-central1-a
- gcloudthe Google Cloud CLI
- computemanage Compute Engine resources
- instancesan argument passed to the command
- listan argument passed to the command
- --projectthe Cloud project ID to operate on
- my-projvalue for --project
- --zonethe zone to operate in
- us-central1-avalue for --zone
$ gcloud storage cp ./dist gs://my-bucket --recursive
- gcloudthe Google Cloud CLI
- storagemanage Cloud Storage buckets and objects
- cpan argument passed to the command
- ./distan argument passed to the command
- gs://my-bucketan argument passed to the command
- --recursiverecurse into directories (e.g. storage copies)
gcloud subcommands
compute — manage Compute Engine resourcesstorage — manage Cloud Storage buckets and objectsauth — manage credentials and authorizationconfig — manage the local gcloud configurationprojects — manage Cloud projectscontainer — manage Kubernetes Engine (GKE) clustersfunctions — manage Cloud Functionsrun — manage Cloud Run servicesiam — manage identity and access managementapp — manage App Engine applications
gcloud flags & options
| --project | the Cloud project ID to operate on |
| --region | the region to operate in |
| --zone | the zone to operate in |
| --account | the account to run the command as |
| --format | output format (json, yaml, table, value, …) |
| --quiet | disable interactive prompts, use defaults |
| --recursive | recurse into directories (e.g. storage copies) |
| --impersonate-service-account | run the command as this service account |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.