Install Cloud Storage FUSE

This page shows you how to install Cloud Storage FUSE by using prebuilt Linux binaries or the latest source code.

Install Cloud Storage FUSE by using prebuilt Linux binaries

Configure package manager

Ubuntu or Debian

If your distribution supports the signed-by option, complete the following instructions:

  1. Add the Cloud Storage FUSE distribution URL as a package source:

    export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
    echo "deb [signed-by=/usr/share/keyrings/cloud.google.asc] https://packages.cloud.google.com/apt $GCSFUSE_REPO main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
    
  2. Import the Google Cloud public key:

    curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo tee /usr/share/keyrings/cloud.google.asc
    

If your distribution doesn't support the signed-by option, complete the following instructions:

  1. Add the Cloud Storage FUSE distribution URL as a package source:

    export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
    echo "deb https://packages.cloud.google.com/apt $GCSFUSE_REPO main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
    
  2. Import the Google Cloud public key:

    curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
    

CentOS or Red Hat

  1. Configure the Cloud Storage FUSE repository and its associated public key:

    sudo tee /etc/yum.repos.d/gcsfuse.repo > /dev/null <<EOF
    [gcsfuse]
    name=gcsfuse (packages.cloud.google.com)
    baseurl=https://packages.cloud.google.com/yum/repos/gcsfuse-el7-x86_64
    enabled=1
    gpgcheck=1
    repo_gpgcheck=0
    gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
          https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
    EOF
    
  2. If you haven't yet, install FUSE by using the YUM Linux package manager:

    sudo yum install fuse
    

Install Cloud Storage FUSE

Ubuntu or Debian

Update the list of available packages and install Cloud Storage FUSE:

sudo apt-get update
sudo apt-get install gcsfuse

CentOS or Red Hat

Install Cloud Storage FUSE:

sudo yum install gcsfuse

Be sure to answer "yes" to any questions about adding the GPG signing key.

Alternatively, you can download the latest prebuilt package of Cloud Storage FUSE directly from GitHub.

Install Cloud Storage FUSE by building the latest source code

To install Cloud Storage FUSE by building the latest source code from GitHub, complete the following steps:

  1. If you haven't yet, install fuse, git, and go (see go.mod for the latest version of go).

  2. Install Cloud Storage FUSE by using the go install command:

    go install github.com/googlecloudplatform/gcsfuse/v2@master
    

    If successful, a binary named gcsfuse is installed to $GOPATH/bin. GOPATH is an environment variable that's used to find the root of your go workspace.

Alternatively, you can also install Cloud Storage FUSE by cloning the git repository to your local file system:

  1. Clone the Cloud Storage FUSE repository:

    git clone https://github.com/GoogleCloudPlatform/gcsfuse.git
    
  2. Switch your current working directory to the gcsfuse folder containing the Cloud Storage FUSE repository:

    cd gcsfuse
    
  3. Install Cloud Storage FUSE by using the go install command:

    go install .
    

    If successful, a binary named gcsfuse is installed to $GOPATH/bin.

What's next

Learn how to mount buckets using Cloud Storage FUSE.