HOW TO MOUNT GOOGLE DRIVE ACCOUNT IN UBUNTU 16.04 USING GOOGLE DRIVE OCAMLFUSE
Introduction
In this article we are going to learn How to mount google drive account in Ubuntu 16.04 using an application named google drive ocamlfuse. Google drive is a cloud data storage service developed & launched by google. It was released initially on year 2012 and one of the best cloud storage service can be usable in many ways i.e. you can use google drive to store data or sync data through website (https://www.google.com/drive/), google drive client apps are available for Microsoft Windows and Mac OS and for Mobile devices like iOS & Android. One of the best part of Google Drive is it allows 15 GB of free storage per each account. but post 15 GB you have to pay for extra storage that you need. You can upload a single file of maximum size 5 TB which is huge size allows by google as compared to other cloud storage services. You can allow others to download data from your Google Drive account by sharing link of that particular file or directory.
google drive ocamlfuse is a nice package for Linux written in OCaml and specially developed to mount google drive account in Linux operating system. It’s like Google Drive client for Linux. By using this application we can mount the Google drive account in Linux such way that we can use it to store data in google drive like we uses any local partition. There are several features includes in google drive ocamlfuse mentioned below :
- Provides full Read OR Write access to ordinary files & folders.
- Allows to create Symbolic links.
- Handles duplicate files.
- Support for multiple accounts.
For more information and features visit the official website of google drive ocamlfuse Here!
Follow the below steps to install and mount Google Drive account in Ubuntu 16.04 using google drive ocamlfuse
As we discussed above to mount Google Drive in Ubuntu 16.04 we have to install an application named google drive ocamlfuse. So to install the same first we have to install official PPA repository for that as it’s not a part of default repository of Ubuntu 16.04. So follow the below command to install the PPA repository.
elinuxbook@ubuntu:~$ sudo add-apt-repository ppa:alessandro-strada/ppa # Install PPA Repository
[sudo] password for elinuxbook:
Mount Google Drive on Ubuntu (via FUSE)
More info: https://launchpad.net/~alessandro-strada/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpzyh07ygm/secring.gpg' created
gpg: keyring `/tmp/tmpzyh07ygm/pubring.gpg' created
gpg: requesting key F639B041 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpzyh07ygm/trustdb.gpg: trustdb created
gpg: key F639B041: public key "Launchpad PPA for Alessandro Strada" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
After installing the PPA repository let’s update the packages & repositories of Ubuntu 16.04 using below command to take effect.
elinuxbook@ubuntu:~$ sudo apt-get update # Update Packages & Repositories
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/kasra-mp/ubuntu-indicator-weather/ubuntu xenial InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 306 kB in 3s (82.8 kB/s)
Reading package lists... Done
Now we are ready to install the google drive ocamlfuse package to mount google drive. So let’s go ahead and install the package using below command.
elinuxbook@ubuntu:~$ sudo apt-get install google-drive-ocamlfuse # Install google drive ocamlfuse Package
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
google-drive-ocamlfuse
0 upgraded, 1 newly installed, 0 to remove and 230 not upgraded.
Need to get 904 kB of archives.
After this operation, 3,978 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial/main amd64 google-drive-ocamlfuse amd64 0.6.21-0ubuntu1~ubuntu16.04.1 [904 kB]
Fetched 904 kB in 2s (342 kB/s)
Selecting previously unselected package google-drive-ocamlfuse.
(Reading database ... 208466 files and directories currently installed.)
Preparing to unpack .../google-drive-ocamlfuse_0.6.21-0ubuntu1~ubuntu16.04.1_amd64.deb ...
Unpacking google-drive-ocamlfuse (0.6.21-0ubuntu1~ubuntu16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up google-drive-ocamlfuse (0.6.21-0ubuntu1~ubuntu16.04.1) ...
As you can see above we have successfully installed the google drive ocamlfuse package. To confirm the same refer the below command.
elinuxbook@ubuntu:~$ sudo dpkg -l google-drive-ocamlfuse # Confirm the installed Package
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================================-=======================-=======================-=============================================================================
ii google-drive-ocamlfuse 0.6.21-0ubuntu1~ubuntu1 amd64 FUSE filesystem for Google Drive
So the installation part has been completed. Now it’s time to mount google drive using google drive ocamlfuse. To do so first we have to authenticate with our Google Drive account with valid Email ID and Password. So to authenticate with Google Drive account run the below command.
Note : For this step you need a ready Google Drive account. If you don’t have then create a new account.
elinuxbook@ubuntu:~$ google-drive-ocamlfuse # Authenticate with Google Drive account
After run the above command your default web browser will open automatically where you have to enter your Google Drive Email ID & Password. Refer the snapshots below.
Enter your Google Drive Email ID :
Enter your Password :
After enter the above details google will ask your permission to access your Google Drive account. So just click on Allow to continue. Refer the snapshot below.
After all above successful steps you will get a message about Successful Authentication. Refer the snapshot below.
Then output of the command would be as shown below “Access token retrieved correctly”
elinuxbook@ubuntu:~$ google-drive-ocamlfuse Access token retrieved correctly.
Now we are ready to mount google drive. For that first create a directory. Here I am creating a directory named drive.
elinuxbook@ubuntu:~$ mkdir drive # Create a Directory
Then use the below command to mount Google Drive account with created directory.
elinuxbook@ubuntu:~$ google-drive-ocamlfuse drive/ # Mount Google Drive Account
To confirm the mount point refer the below command.
elinuxbook@ubuntu:~$ df -h | grep drive # Confirm the Mount Point
google-drive-ocamlfuse 15G 2.6G 13G 18% /home/elinuxbook/drive
Now use your Google Drive data or drive by entering in to mounted directory. Here in my case it’s drive.
elinuxbook@ubuntu:~$ cd drive/ # Enter in to mounted Google Drive account
# Below output show's the data of my Google Drive account
elinuxbook@ubuntu:~/drive$ ls
documents Softwares docs ELinuxBook Linux Videos
To Unmount the Google Drive use the below command.
elinuxbook@ubuntu:~$ fusermount -u /home/elinuxbook/drive # Unmount the Google Drive
To uninstall the package use the below command.
elinuxbook@ubuntu:~$ sudo dpkg -r google-drive-ocamlfuse # Uninstall the google drive ocamlfuse Package
(Reading database ... 174202 files and directories currently installed.)
Removing google-drive-ocamlfuse (0.6.21-0ubuntu1~ubuntu16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
This is how we can mount google drive account in Ubuntu 16.04 using an application named google drive ocamlfuse. If you found this article useful then Like us, Share this post on your preferred Social media, Subscribe our Newsletter OR if you have something to say then feel free to comment on the comment box below.