# Mount Google Drive in Ubuntu :cloud::floppy_disk:

Scope: Mount Google Drive from a terminal using Google Drive Ocamlfuse.

### Preflight check
You'll need the following package:

- google-drive-ocamlfuse

You may install it via the Apt package manager:

`sudo add-apt-repository ppa:alessandro-strada/ppa`

`sudo apt-get update`

`sudo apt-get install google-drive-ocamlfuse`

Alternatively, you may retrieve the relevant (per your distribution) .deb file from: `launchpad.net`, 
then execute it using Apt, e.g.:

`cd ~ && wget --progress=bar --tries=3 --wait=5 \
https://launchpad.net/~alessandro-strada/+archive/ubuntu/ppa/+files/google-drive-ocamlfuse_0.7.23-0ubuntu1~ubuntu16.04.1_amd64.deb`

`sudo apt install ./google-drive-ocamlfuse_0.7.23-0ubuntu1~ubuntu16.04.1_amd64.deb`

### How to Mount Google Drive using Google Drive Ocamlfuse from a Terminal

**NOTE:**_You must link ocamlfuse to your Google Drive account **once**_, by calling ocamlfuse without parameters:

`google-drive-ocamlfuse`

This will open a browser, and present you with an authenticaion prompt.

_For additional configuration options see [here](https://github.com/astrada/google-drive-ocamlfuse/wiki/Configuration)._

* Step 1: 

Create a mount point (if one does not exist), e.g.: 

`sudo mkdir -v /media/GDriveNetID`

* Step 2: 

Grant current user ownership of mount point, e.g.: 

`sudo chown -Rv $USER /media/GDriveNetID`

* Step 3:

Mount Google Drive to mount point created above, e.g.: 

`google-drive-ocamlfuse -label NetID /media/GDriveNetID`

* Step 4:

When you're done, unomount Google Drive: 

`cd ~ && fusermount -u /media/GDriveNetID` 

:neckbeard::heart: