How to Mount Your Google Drive in Ubuntu Using Google-Drive-Ocamlfuse

Google Drive is one of the most popular cloud storage services available today, offering loads of free storage. When the service launched back in 2012, its desktop clients for Windows and Mac OS were also released. However, curiously missing was the official support for Linux, and unfortunately, the situation is the same today as well.

Waiting for an official Google Drive Linux client all these years, people developed several unofficial ones, some of which we’ve already discussed here at MTE. However, in this article we will discuss a special tool, dubbed Google-Drive-Ocamlfuse, that – unlike other regular clients – lets you mount your Google Drive locally on your Ubuntu system.

According to the tool’s official website, Google-Drive-Ocamlfuse is a FUSE-based file system backed by Google Drive. Written in the OCaml language, it allows users to mount their Google Drive in Linux, letting them use it as a normal directory. Here are some of the features the tool provides:

  • Full read/write access to ordinary files and folders
  • Read-only access to Google Docs, Sheets, and Slides (exported to configurable formats)
  • Multiple account support
  • Duplicate file handling
  • Access to trash (“.Trash” directory)

You can download and install the Google-Drive-Ocamlfuse tool by running the following commands in your Ubuntu system:

Once done, the next thing you need to do is to authorize the tool to access your Google Drive, something which you can do by running the following command:

This opens a tab in your default Web browser, where the tool basically requests your permission to access your Google Drive con tent.


Just click the “Allow” button and you’ll see the following message from Google Accounts, letting you know what the application is doing and what information will be shared with it:


Click the “Allow” button, and the required access (authorization) will be granted to the tool, completing the setup for it.

Next up, create a local directory on your Ubuntu system where your Google Drive contents will be mapped. For example, in my case I created a directory called “gdrive_local.”

Once done, run the following command to mount the file-system locally:

It took a bit of time, but finally I could see all my Google Drive contents in the “gdrive_local” directory:


From here onward, I was able to make changes locally, and those were reflected in the cloud – vice-versa was also true.

The tool’s configuration file is usually located at the path “~/.gdfuse/default/config.”


Here you can tweak the values of different parameters to achieve what you want. For example, the default interval (in seconds) between queries to detect server-side changes is 60 seconds, but you can change it by changing the value of the metadata_cache_time parameter. Similarly, if you want the file system to be mounted read-only, change the value of “read_only” parameter to “true.”

For more information, head to the google-drive-ocamlfuse wiki.

Having the Google Drive system mounted locally has its own advantages. For example, you can perform directory operations on it through the command line, making your Google Drive operations faster (if you are an experienced command line user). As for the tool, it’s not at all difficult to learn. Plus, as already mentioned, there’s also a detailed Wiki available for you to learn the advance usage.