Home > Linux, Ubuntu > How to Mount Google Drive in Linux with google-drive-ocamlfuse

How to Mount Google Drive in Linux with google-drive-ocamlfuse

Ubuntu One is not included in the latest Ubuntu 14.04 LTS, and will be phased out on the 1st of July 2014, with files from users being completely wiped out by the 31st of July. I liked the service to exchange files between my Ubuntu computer and Android phones, and features like automatic upload of pictures. Luckily there are alternative such as Dropbox, Copy.com, and ownCloud, each with their own pros and cons. But today, I’ll show how to easily use your Google Drive in Ubuntu / Debian. Last year, I wrote about insync, a beta service that offers Google drive integration into Linux, but since service went out of beta, the company started to charge $15 per account for consumers (one time year), with business plans starting at $15 per year. If you are interested in this solution you can still give it a try for free for 14 days. I’d you’d rather not pay extra there are some other solutions such as gsync, rsync for Google Drive, which will sync your files between your hard drive and Google Drive. That means you’ll have at least two sets of files one of each of your devices, and one on Google Drive.  If you’d rather mount and access your Google Drive in Linux, you can use google-drive-ocamlfuse, and that’s exactly what I’ve tested by following the instructions found on webpd8.org.

Google Drive in Nautilus

Google Drive in Nautilus

According to the project website “google-drive-ocamlfuse is a FUSE-based file system backed by Google Drive, written in OCaml, which lets you mount your Google Drive on Linux.” It supports read/write access to ordinary files and folders, read-only access to Google Docs, Sheets, and Slides (exported to configurable formats), Multiple accounts, duplicate file handling, and access to trash.

Let’s see how to install it in Ubuntu (14.04):

sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse

Now you’ll need to authorize the application to connect to your Google Drive account:

google-drive-ocamlfuse

This command will open a web page in your default browser requesting access to Google Drive, and a few second after login, your account should become authorized.

To access Google Drive as an external storage, simply create a new directory, and “mount” your Google Drive as follows:

mkdir ~/gdrive
google-drive-ocamlfuse ~/gdrive

To automatically mount your Google Drive at boot time, add “google-drive-ocamlfuse ~/gdrive” to the Startup Applications. You could also modify fstab file as mentioned in the Wiki. The later also explains how to connect multiple accounts, how to authorize it from a headless system, how to install it from source, and more.

If you’ve used insync (beta) previously, you can remove it as follows:

sudo apt-get purge insync-beta-ubuntu && sudo apt-get autoremove
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

  1. johnzbesko
    April 30th, 2014 at 04:45 | #1

    I’m trying to add space to my home server by upgrading from 1TB Raid 1 to 2TB RAID 10. This action requires me to reformat/partition the RAID array. Google Drive costs $10/TB/month, so I wish to backup the entire /home partition on Google.

    I presume I can mount my google drive using ocamlfuse, copy my /home to it and then rebuild my server and retrieve the file and folders.

    Will google-drive-ocamlfuse accomplish this for me? Would I be better off using gsync or gdrive?

    Thanks for your help. I also posted this problem on Ubuntu Forums and got plenty of views, but no replies.

  1. No trackbacks yet.