gsutil Tool

gsutil is a Python application that lets you access 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.

For a complete list of guides to completing tasks with gsutil, see Cloud Storage How-to Guides.

Getting started

The best way to get started with the gsutil tool is to follow the gsutil Quickstart. The quickstart shows you how to set up a Google Cloud Platform project, enable billing, install gsutil, and run basic commands with the tool.

If another individual has already set up a Cloud Storage account and has added you to the project as a team member, or if you have been granted access to an object or bucket, you can get gsutil as part of the Google Cloud SDK to access the protected data. You do not need to activate Cloud Storage or set up billing.

Accessing public data

If you only want to access public data, follow the instructions in Accessing Public Data. By following the steps found in the gsutil tab, you can immediately access freely available, publicly accessible data; you do not need to sign up for a Google account or authenticate to Cloud Storage to use gsutil for this purpose.

Syntax for accessing resources

gsutil uses the prefix gs:// to indicate a resource in Cloud Storage:

gs://[BUCKET_NAME]/[OBJECT_NAME]

In addition to specifying exact resources, gsutil supports the use of wildcards in your commands.

By default, gsutil accesses Cloud Storage through JSON API request endpoints. You can change this default to the XML API.

Built-in help

gsutil contains thorough built-in help about every command as well as a number of topics, which you can get by running:

gsutil help

This command outputs a list of all commands and available help topics, and you can then get detailed help for each command or topic. For example, you can get help about the gsutil cp command by running:

gsutil help cp

To get information about gsutil top-level command-line options, use:

gsutil help options

To get information about your gsutil installation, use:

gsutil version -l

The gsutil help pages are also available online. For example, the online pages for the commands shown above are gsutil help, gsutil cp, gsutil options, and gsutil version.

About gsutil

gsutil is an open-source project. To download the developer version of gsutil or volunteer to help develop gsutil, visit the gsutil project on GitHub.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Storage Documentation