Install Google Drive Ocamlfuse on Ubuntu 16.04, Linux Mint 18, Debian 8
Google Drive Ocamlfuse provides an easy and free way to access your Google drive on Linux. It’s a FUSE file system for Google drive, written in OCaml. This tutorial is going to show you how to install Google Drive Ocamlfuse on Ubuntu 16.04, Linux Mint 18, Debian 8 Jessie and then mount your Google Drive. It’s doesn’t cost you a dime and it’s very easy to do.
Google Drive Ocamlfuse’s features includes:
- Read and write access to ordinary files and folders
- Read-only access to Google Docs, Sheets and Slides
- Multiple account support
- Duplicate file handling
- Access to trash (.Trash directory)
Install Google Drive OCamlfuse on Ubuntu 16.04, Linux Mint 18
You can easily install Google drive Ocamlfuse on Ubuntu 16.04, Linux Mint 18 from official PPA. Fire up a terminal window (
CTRL+ALT+T), then run the following commands to add the PPA, update local package index and install the application.
sudo add-apt-repository ppa:alessandro-strada/ppa sudo apt update && sudo apt install google-drive-ocamlfuse
Once it’s installed, run the following command to authorize.
It will open a new tab in your browser asking you to grant it permission to view and manage the files in your Google Drive. Click
Next, select your Google account and click
Then in the terminal window, it will tell you the access token is retrieved correctly. Authorization is now complete.
Mount Your Google Drive
First, create a mount point for your Google Drive, such as
Then mount your Google drive using the following command:
Now open your file manager, you will see a new tab on the left pane and your files in Google Drive will populate
To unmount Google drive, issue this command:
fusermount -u ~/google-drive
How to Compile Google Drive Ocamlfuse from Source on Debian 8
There’s no official deb package for Debian. But we can easily compile it from source. First, install
OPAM package manager.
sudo apt install opam
Then install build dependencies.
sudo apt install m4 libcurl4-gnutls-dev libfuse-dev libsqlite3-dev zlib1g-dev libncurses5-dev pkg-config
Initialize OPAM state.
Update the list of available packages.
Compile and install Google Drive Ocamlfuse.
opam install google-drive-ocamlfuse
How to Use Google Drive Ocamlfuse to Back up Files on Ubuntu/Debian Server
First, ssh into your server and follow the above instructions to install Google Drive Ocamlfuse on the server. Note that on Ubuntu server, you need to install the
software-properties-common package in order to add PPA.
sudo apt install software-properties-common
The authorization procedure is a little bit different because usually you don’t install GUI on Linux server.
Go to Google API console, Sign in with your Google account. Create a new project.
Credentials on the left pane. Click
Create Credentials and then select
OAuth client ID.
Select other as the application type and give it a name.
You will get your client ID and client secret.
Library on the left pane, then click
Drive API under
Google Apps API.
Click Enable on the next page.
Now, back to your Linux server terminal, issue the following command. Replace the red text with your real client ID and client secret.
google-drive-ocamlfuse -headless -id your-client-id -secrect your-client-secret
You will be asked to open a URL in your browser. In the browser you will be asked to allow Google Drive Ocamlfuse to view and manage the files in your Google Drive.
Allow, then copy the verification code and paste it to the terminal. You will see the following message.
Access token retrieved correctly.
Now make a directory as the mount point.
And mount your Google drive on your server.
Cd into the directory and you will see your Google Drive files.
That’s it! I hope this article helped you mount Google Drive on your Ubuntu 16.04, Linux Mint 18 or Debian 8 machine. As always, if you found this post useful, then subscribe to our free newsletter or follow us on Google+, Twitter or like our Facebook page. Thanks for visiting!