_partials/cn/windows_settings.md
我们需要一个简单的方法在Windows和Ubuntu之间交换文件。
想这样的话,你需要建一些可以从Windows的File Explorer访问Ubuntu文件目录的快捷键。
你需要做下面这些步骤:
\\wsl$\(如果不行的话,就输入\\wsl$\Ubuntu)另一个交换文件的方法是从Ubuntu终端打开WindowsFile Explorer。
你需要做下面这些步骤:
explorer.exe .命令(或者,使用wslview .)wsl --shutdown然后再重新打开Ubuntu终端你可能想搞清楚Ubuntu文件系统里的Windows目录到底在哪儿。或者Windows文件系统里的Ubuntu目录在哪儿。
要把一个Windows路径变成Ubuntu路径(或者反过来),你需要做:
wslpath "C:\Program Files"命令来把Windows路径变成Ubuntu路径wslpath -w "/home"命令来把Ubuntu路径变成Windows路径wslpath -w $(pwd)命令会返回当前Ubuntu路径的Windows路径