Google Drive on Linux, A Command-line Tool

This works on Ubuntu 12.04.

As of 05/26/2017, Google has not provided a tool for Google Drive on Linux. Third party softwares have been developed to fill this gap. Some are GUI-based, such as the support added in the GNOME project and some are command-line, such as google-drive-ocamlfuse.

Yet, I have no plan to upgrade to higher version of GNOME, nor spend money on the GUI tools (Some are commercial). The PPA source of google-drive-ocamlfuse seems to be non-exist.

However, later I encountered with this commline-line tool drive. The tool caught my eyes immediately, because it is based on the go language. It looks neat to me to resolve an issue with a Google service using a Google product.

The steps are simple:

  1. Install the go language from here
  2. Make sure to add PATH and GOPATH to the shell environment
  3. Follow the steps to install drive
  4. In particular, one needs to do,

    1
    2
    3
    drive init <folder_to_mount_google_drive>
    cd <folder_to_mount_google_drive>
    drive pull

  5. One can also add a .driveignore file to ignore some files for syncronizing. Just like git or hg.