[英]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.