26

I want to know difference between gcloud and gsuitl. Where do we use what? Why certain commands begin with gsutil while others with gcloud?

Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
Kshitij Singh
  • 411
  • 1
  • 4
  • 7

4 Answers4

34

The gsutil command is used only for Cloud Storage.

With the gcloud command, you can interact with other Google Cloud products like the App Engine, Google Kubernetes Engine etc. You can have a look here and here for more info.

siamsot
  • 1,501
  • 1
  • 14
  • 20
  • 16
    For additional "color", first came App Engine then Cloud Storage. At that time, there were service-specific CLIs for each (`gsutil` for Cloud Storage). By the time `gcloud` (Cloud SDK) provided a framework for any Google Cloud Platform service, `gsutil` was so embedded|familiar, that it was not (and still hasn't been) unified under `gcloud` (e.g. `gcloud storage ...` does not exist). Generally this isn't a problem although it begs the OP's question *and* it sometimes adds complexity when trying to script `gcloud` and `gsutil` when dealing with e.g. authentication. – DazWilkin Nov 16 '19 at 20:51
  • 3
    As of recent gcloud releases (402.0.0) `gcloud storage` exists in GA and lets you do the basic file operations (cat, cp, mv, ls, rm) which previously were only available using gsutil. It is [advertised](https://cloud.google.com/blog/products/storage-data-transfer/new-gcloud-storage-enables-super-fast-data-transfers) to be faster-by-default than equivalent gsutil commands – Steve Campbell Sep 23 '22 at 15:46
4

The gsutil is a Python application that lets you access Google Cloud Storage from the command line. You can use gsutil to do a wide range of bucket and object management tasks, including:

Creating and deleting buckets. Uploading, downloading, and deleting objects. Listing buckets and objects. Moving, copying, and renaming objects. Editing object and bucket ACLs.

The gcloud command-line interface is the primary CLI tool to create and manage Google Cloud resources. You can use this tool to perform many common platform tasks either from the command line or in scripts and other automations.

For example, you can use the gcloud CLI to create and manage:

Google Compute Engine virtual machine instances and other resources, Google Cloud SQL instances, Google Kubernetes Engine clusters, Google Cloud Dataproc clusters and jobs, Google Cloud DNS managed zones and record sets, Google Cloud Deployment manager deployments.

4

"gcloud" can create and manage Google Cloud resources while "gsutil" cannot do so.

"gsutil" can manipulate buckets, bucket's objects and bucket ACLs on GCS(Google Cloud Storage) while "gcloud" cannot do so.

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
3

With gcloud storage you can do now everything what you can do with gsutil. Look here: https://cloud.google.com/blog/products/storage-data-transfer/new-gcloud-storage-cli-for-your-data-transfers and also ACL on objects: https://cloud.google.com/sdk/gcloud/reference/storage/objects/update

  • Whilst this may theoretically answer the question, [it would be preferable](//meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Skully Jan 02 '23 at 02:11