How to Integrate Google Drive in Ubuntu

By | September 26, 2014
Don't be shellfish...Share on Google+Share on FacebookTweet about this on TwitterPin on PinterestShare on StumbleUponEmail this to someone

drive-featured

In this tutorial we will be making use of a small command-line program call “drive” that is written in Google’s “Go” programming language, by member of the Google Drive’s platform team to integrate Google Drive in Ubuntu.

First you need to understand how it works. It basically works similar to GitHub, i.e. you have to use “push” command to update files to your drive and “pull” command for retrieving any file from you drive. The developers who implemented this program, cited various reasons that background syncing is that beneficial as it seems, one simple reason being that it simply uses the bandwidth unnecessarily, even when the files are still up-to date, which is a little cumbersome if you have a slow-internet connection.

This however, might simply be the closest thing we have as of now, for integrating Google Drive on Ubuntu.

Installing  Go Compiler

To use the command-line program we first need to install a compiler for Google’s Go Programming Language. Open the terminal by pressing Ctrl+Alt+T and type the following Command :

sudo apt-get install golang git mercurial

Enter password

Press “Y” or “y” when prompted to

Press Y when asked to

Also See: How to run exe files on Ubuntu

Installing Google Drive

After installing the Go compiler, type the following command to download and install Drive.

go get github.com/rakyll/drive

Now once the drive is installed you can use the following command to view the attributes for drive program

drive help

drive-help

Advertisement

Setting up the Google Drive

To initialize the Google Drive for your account on your computer , type the following command

drive init <directory>

e.g.

drive init /home/kashif/kashif_drive

authenticate_user

You will be asked to authenticate your account.

ask-permission

Using the drive

You can use “drive push” command to push a file to the remote server.For e.g.

drive push xyz.txt

push-command

pushes the file “xyz.txt” stored at your current directory into our drive.

Also See: How to make Bootable Ubuntu USB Flash Drive?

Alternatively , you can use “drive pull” command to retrieve files from you Google Drive account. For e.g. “drive pull xyz.txt” , downloads the file “xyz.txt” stored in your drive into your current directory. If you wish to download a file stored in a particular folder you can use “drive pull text/xyz.txt”, this downloads a file named “xyz.txt” from the folder name “text” stored on your Drive, into your current directory.

Thus, you have to manually make sync your files, as per your requirement.

One thought on “How to Integrate Google Drive in Ubuntu

  1. Pingback: Get the best out of Dropbox in Ubuntu - DevilShouts

Leave a Reply

Your email address will not be published. Required fields are marked *