How to access Google Drive Folder from Ubuntu App in Windows 10

Viewed 3294

I am using ubuntu app inside of windows 10. I can access most of windows files using bash. The windows documents are inside of /mnt/c. Thats ok.

I can access "Google Drive" folder in Command Prompt (cmd.exe) with entering G: command in Windows 10. (Google Drive Commercial, drive file stream) It is also ok. My question is

Is there any way to access "Google Drive" folder using bash?

Attempt 1:

I made a shortcut of "Google Drive" folder in Windows' desktop. I open the bash, and write cd /mnt/c/Users/Taygun Bulmus/Desktop. But it is not a directory.

Related questions:

how to read sh files on Ubuntu built in Windows 10 developer mode,

Windows Linux Subsystem - Accessing Files outside of Ubuntu

EDIT 1:

It is still open issue for wsl community (17/03/2020):

Mount Google Drive File System to WSL #2999

4 Answers

This works now:

On WSL 2, Windows 20H2 (set to German), Google Drive Version 47.0.19.0

windows@DESKTOP-I608RI4:/mnt/g/Meine Ablage/Data$ echo hello > hello-cr.txt
windows@DESKTOP-I608RI4:/mnt/g/Meine Ablage/Data$ ls

Unfortunately, there is not any solution for google drive for commercial use: "Drive File Stream" (see this REF). For personal use, you can specify a folder that you can access from bash.

Open bash,

cd /mnt/c/[%Your Synced Google Drive Folder%]

For access folder use command: cd /mnt/<drive>/address_folder'

go to C:\Windows\System32 and create a shortcut of wsl.exe. Then you can change the "start in" property of the shortcut to your drive path and voilĂ .

Related