How to mount Google Drive on Linux & Windows systems

Surbhi Goel
3 min readSep 15, 2021

--

In the times of big data, when everything is moving to cloud, it is important to know how to connect our local machines with the online storage space. Google Drive is our backbone when it comes to sharing large dataset online and it becomes vital to be able to access it on the local system. Coding with web based platforms like jupyter notebook is one of the examples where one needs access to cloud based data and codes.

Ubuntu systems are favorite for coders, but it is fairly tricky to mount cloud storage on them. Similarly for windows systems, with the backup and sync option being a little twisted for data in the shared folders, the given steps will make syncronising the shared folders a lot easier. I myself struggled a bit in the beginning and thought of consolidating the mounting steps for future users. Here is a simple step by step process of how we can mount google drive to Ubuntu and Windows operating systems.

Linux System

Google drive has launched a FUSE-based file system that allows users to access files and folders in google drive through command line as well as the File Explorer. Run through the following steps to mount your Google Drive with your Linux machine:

  1. Install ocamlfuse using the following command:
sudo add-apt-repository ppa:alessandro-strada/ppasudo apt update && sudo apt install google-drive-ocamlfuse

2. Run ocamlfuse in the command line:

google-drive-ocamlfuse

3. Authorize the ocamlfuse system to access files and folders on your google drive. A sign-in window will open in your browser automatically where the user needs to sign-in and provide required access.

4. Make a new directory named ‘googledrive’ where the Google drive will be mounted

mkdir ~/googledrive

5. Mount the google drive on your Linux-based system by running the following command and you are done:

google-drive-ocamlfuse ~/googledrive

6. Unmounting of the FUSE system can be done in case one wishes to disconnect the google drive with local system, by running the following command:

fusermount -u ~/google-drive

Note: In case the google drive get unmounted on rebooting the system, run the above command in step 5 again and you will be good to go.

Windows System

Files and folder in the ‘My Drive’ section sync easily when we download the desktop version of Google Drive. Follow through these steps to access all the data without hassle.

  1. Install Google drive for desktop from the following link and sign-in :

https://www.google.com/intl/en_in/drive/download/

2. Login and sync the data in your machine

Access data on Shared Drive

By default, we can only access data in the ‘My Drive’ section of google drive in our local machine. The files and folders in the ‘Shared with me’ section need to be added to ‘My Drive’ for them to be available in your machine. Please follow the below steps to perform the same. Also, the process remains same for both Linux as well as Windows systems here:

1. Open google drive in browser and open the ‘Shared with me’ folder. Single-click the files/folders required and press shift+Z on your keyboard.

2. Add file/folder to ‘My Drive’ by selecting it from the drop-down that appears after step1.

Finally, open google drive on your local machine and check for the folders you needed.

There you go! :D

--

--