If you are using Ubuntu 16.10 or later, skip the first section of this answer and follow the instructions in the second section instead.
Grive2
The grive package from the Ubuntu Software Center no longer works because Google has discontinued service for Google Documents List API version 3.0, replacing it with a new API. The grive package has been forked by Grive2. The Grive2 fork supports the new Google Drive REST API and it also includes a new feature: partial (directory) sync.
The instructions for installing Grive2 in Ubuntu 14.04-17.04 are as follows:
If you have already installed grive, first clear out the old version using this command:
sudo apt-get purge grive
Install Grive2 in Ubuntu 14.04-17.04
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install grive
Create a new directory in your home directory for syncing files with Google Drive.
mkdir ~/grive
Change directories to the new grive folder.
cd ~/grive
The first time you run Grive2 use the -a option for requesting an authorization token from Google which is used to get permission to access your Google Drive.
grive -a
grive will prompt you to input the authentication code for your Google Drive.
The instructions for manually installing Grive2 in Ubuntu 17.10 are here.
Google Drive integration in GNOME 3.18 and later
GNOME 3.18 and newer (in Ubuntu 16.10 and later) has native desktop integration that will let you easily browse, manage, open, upload, and download your files. Just add your Google account in GNOME's online accounts application to get started.
Ubuntu 16.10-17.04
To enable Google drive desktop integration in Ubuntu 16.10-17.04 follow these steps:
Install GNOME System Settings and GNOME Online Accounts.
sudo apt-get install gnome-control-center gnome-online-accounts
Launch GNOME Online Accounts.
gnome-control-center online-accounts
Make sure you close Unity Control Center first. If you have Unity Control Center open and you call gnome-control-center online-accounts, then it opens the Unity Control Center window instead of the GNOME one.
In the new Online Accounts window that opens click the Add an online account button, then in the Add Account window click the Google icon to add your Google account and authenticate with your Google password. Make sure Files is enabled by being toggled to the ON position.
You should now be able to access your Google Drive files from the Files (nautilus) app.
The same steps also work in Ubuntu 16.04 if it has GNOME 3.18 or newer installed. The current version of nautilus in Ubuntu 16.04 is nautilus 3.18.4.is.3.14.3-0ubuntu5.
Ubuntu 17.10 and later
Open System Settings and select Online Accounts -> under the Add an account heading select Google and authenticate with your Google password.
