简体   繁体   English

如何从适用于 Linux 的 Windows 子系统 (WSL) 访问我的 Google Drive (G:) Windows Mount?

[英]How do I access my Google Drive (G: ) Windows Mount from the Windows Subsystem for Linux (WSL)?

I'm working on a project that I have stored on my Google Drive mount on Windows, and I would like to use Linux for portions of that project.我正在开发一个项目,该项目已存储在 Windows 上的 Google Drive 挂载上,并且我想将 Linux 用于该项目的部分内容。 The Windows Subsystem for Linux has served me well for most of my projects, but I've never had the need to mount a network drive.适用于 Linux 的 Windows 子系统为我的大多数项目提供了良好的服务,但我从未需要安装网络驱动器。 While it's not imperative that I use my Google Drive mount for this project (I could easily place it in my /downloads or /documents folder), I was curious as to how I could access my Google Drive from WSL.虽然我不必为此项目使用我的 Google Drive 挂载(我可以轻松地将它放在我的/downloads/documents文件夹中),但我很好奇如何从 WSL 访问我的 Google Drive。

I attempted to create a new mount via:我试图通过以下方式创建一个新的挂载:

sudo mkdir /mnt/googledrive

This successfully created the directory, and then I used the command:这成功创建了目录,然后我使用了命令:

sudo mount -t drvfs G: /mnt/googledrive

This too seemed to be successful.这似乎也很成功。

I was able cd to the /mnt/googledrive directory, but I couldn't access any of my files (it reported the '.' location was unavailable).我可以cd/mnt/googledrive目录,但我无法访问我的任何文件(它报告“.”位置不可用)。

Perhaps I've simply misunderstood what I was doing?也许我只是误解了我在做什么?

Any help would be greatly appreciated!任何帮助将不胜感激!

I found a workaround, not using the "Google Drive" application but the "Backup and Sync" for individuals ( https://www.google.com/drive/download/ ).我找到了一种解决方法,不使用“Google Drive”应用程序,而是使用个人的“备份和同步”( https://www.google.com/drive/download/ )。

Basicaly it's doing the same for me but in a different way.基本上它对我做同样的事情,但以不同的方式。 Backup and Sync will permit you to backup your drive to Google but also Sync your Google Drive localy.备份和同步将允许您将您的驱动器备份到谷歌,但也同步您的谷歌驱动器本地。

By choosing to sync your drive localy, you can even select some folders, the files are sync to the "C" drive under your user profile at the same level of your "My Documents" folder.通过选择在本地同步您的驱动器,您甚至可以选择一些文件夹,文件将同步到您的用户配置文件下的“C”驱动器,与“我的文档”文件夹相同。

Using that way, you can access your files from your linux with the working /mnt/c/... link.使用这种方式,您可以使用 /mnt/c/... 链接从您的 linux 访问您的文件。

If that answer is too late for you, might be still in time for others ;-)如果该答案对您来说为时已晚,那么其他人可能还来得及;-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google drive - WSL2 中的虚拟驱动器挂载 - Google drive - virtual drive mount in WSL2 如何在 Windows 10 中从 Ubuntu 应用程序访问 Google Drive 文件夹 - How to access Google Drive Folder from Ubuntu App in Windows 10 如何使用Google Drive API密钥从android应用程序访问驱动器内容? - How do I use the Google drive API key to access drive content from android application? 我无法在 Google Colab 中安装我的另一个驱动器 - I can't mount my another drive in Google Colab 如何从 Google Colab 访问我的 Google Drive 文件? - How can I access my Google Drive files from Google Colab? 如何使用Windows Media Player从Google云端硬盘流式传输视频? - How can I stream video from Google Drive by using Windows Media Player? 如何仅使用Google Android应用中的Google Drive API在Google云端硬盘上创建和编辑电子表格文件? - How do I create & edit a spreadsheet file on google drive using Google Drive APIs only from my Android app? 如何从我的 Web API 访问 Google Drive API - How to access Google Drive APIs from my Web API 如何从刷新令牌为Google Drive API生成访问令牌? - How do I generate an access token from a refresh token for the Google Drive API? 如何从远程服务器访问Google云端硬盘应用数据? - How do I access Google Drive Application Data from a remote server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM