How to Sync Google Drive on Linux

HomeLinuxHow to Sync Google Drive on Linux

How to Sync Google Drive on Linux

For some services, Linux is still minority. Google Drive is one those services that think so. Google Drive doesn’t provide a client app for Linux to enable Linux users to sync their Google Drive to the computer. But, there are so many ways to get to Rome. If you want to sync your Google Drive to your computer, you can use unofficial client apps developed by some developers. One of the app you can use is Grive2.

Grive2 is an unofficial Google Drive client for Linux developed by a programmer named Vitaliy Filippov. Grive2 is forked from the similar app called Grive. This app interacts with Google Drive via the REST API of Google Drive.

Grive2 is a CLI-based Google Drive client, written in C++. The use of this app might a bit hassle for those who don’t familiar to using CLI. It doesn’t run as a background process like, for instance, official Dropbox client app. So, to sync your Google Drive to computer you have run Grive2 manually and re-run it every time you made changes on your Google Drive account (like adding new files or editing ones) or local folder on your computer that connected to Google Drive.

In this article, I will show you how to use Grive2. Just for your information, I use Ubuntu 16.04 in this article. Grive2 requires some libaries to run. Following are the libraries needed by Grive.

  • yajl 2.x
  • libcurl
  • libstdc++
  • libgcrypt
  • Boost
  • expat

To install Grive2 on Ubuntu, you can type the following commands.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install grive

Once Grive2 is successfully installed, you can start using it. But first, you need to create a new directory to download the files from Google Drive. You will also use this folder to upload local files to Google Drive. In other word, this is the folder that will be synced to your Google Drive account.

mkdir -p ~/grive

Then, get in to the new folder you have just created.

cd ~/grive

On the first use of Grive, you need to run Grive2 using the option of “-a”. This option is used to gain access to your Google Drive account.

grive -a

Click the provided link to get the authentication code. If you are not directed to a new page in your web browser, copy the link manually and open it in your web browser.

You will get a random authentication code. Paste the code you get on the terminal where you run Grive2 and press enter.

Grive2 will start working to sync Google Drive files to your computer. Grive2 comes with some parameters you can try. To see them, simply type grive --helpon the terminal.

hand-picked weekly content in your inbox


related posts