How to Sync Google Drive With Linux (Without Using google-docs-fs)

google-docs-fs is a very useful app that was created for Linux so as to mount Google Docs account as if it was a filesystem; It was also used to sync Google Drive accounts with Linux. Although, this app has become a bit old and its PPA doesn’t work anymore, the reason why I’m going to show you in this post another way to sync Google Drive with Linux (Ubuntu) using another app called Grive which is a CLI Google Drive client.

Installing Grive

To get Grive for Ubuntu, we’ll be using PPA Repositories; so, we need to run these commands:

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install grive

Using Grive

First, you must create a folder in which Google Drive files are going to be stored. You can use this command to do that.

mkdir ~/GoogleDrive

Next, access that folder using:

cd ~/GoogleDrive

Since this is the first time you use Grive, you must add “-a” to configure it. So the command you need run is:

grive -a

This is going to give you a link that you should copy and past in you browser so as to allow Grive to access your Google Drive account, and get an authentication code that you need to past past in the Terminal

Now, every time you want your GoogleDrive folder to be synced, you must access it then run Grive, this time without “-a” argument because you’ve already configured Grive. OR you should simply download a .sh file that does the work for you.


Tweet&getit is powered by Viuu

Don’t forger to allow execution of the .sh file; and Note that the it will sync ~/GoogleDrive folder, so if you choose another directory, you’ll have to edit the .sh.

  • sirvon

    or u can jus put google drive inside of the dropbox folder on a windows machine
    then install dropbox on a linux machine
    now whatever u can control your google drive from linux using dropbox as a conduit

    • http://followthegeeks.com Mohamed Semlali

      Brilliant! This will save a lot of time! Though, you will be using only 2GB out of 5GB that is offered by Google Drive :(

  • pummette

    Where’s the .sh file to download?
    Thanks

  • Pingback: Insync Brings Google Drive to Ubuntu in a More "Graphical" Way | Follow The Geeks

  • curtis

    Interesting but the Grive command just does not run. I get an error message stating: “grive: command not found” and can’t find much help on internet to fix this.

  • RJ

    Or instead of downloading a file and posting on twitter, you can just open up a text editor, and write the file yourself. On the first line write “cd ~/(YourDriveName)” and on the second line write “grive” all without quotations. Then you just need to save it as sync.sh or google.sh or whatever you want.

    • http://followthegeeks.com Mohamed Semlali

      I asked for help to spread the knowledge, that’s it, please don’t blame me for that.

    • Michael Sersen

      Or you could just do: alias sync=’cd /path/to/grive && grive’ Then just type sync from command line.

  • majeem

    When I run “grive -a” I am getting an error message that the command doesn’t exist.

  • http://www.thetabiz.com/ JLouisBiz

    Quick and nice explanation, I will move Google Docs into S3 now.