Skip to content

Mount Google Drive on Headless Linux (Ubuntu)#

google-drive-ocamlfuse is a FUSE filesystem for Google Drive, written in OCaml.

GitHub: astrada / google-drive-ocamlfuse

Install google-drive-ocamlfuse#

sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update && sudo apt-get install google-drive-ocamlfuse

Headless Authorization - Simple trick#

echo $'#!/bin/sh\necho $* > /dev/stderr' > xdg-open
chmod 755 xdg-open
env PATH=`pwd`:$PATH google-drive-ocamlfuse

Mounting Google Drive#

Let's say we want to mount Google Drive to ~/G_DRIVE for example

Create a new directory serve as the mounting point

cd ~
mkdir G_DRIVE

Mount to the directory

google-drive-ocamlfuse G_DRIVE

Unmounting#

fusermount -u G_DRIVE

or

umount G_DRIVE