我应该告诉Intellij我的WSL文件系统区分大小写吗? [英] Should I tell Intellij that my WSL filesystem is case sensitive?
问题描述
我与Linux的Windows子系统共享Windows 10文件系统.我将编码项目保留在用户目录的dev
文件夹中,并将其共享给WSL中的/mnt/c/Users/Conan/dev
. Intellij从Windows文件系统运行项目,但是我使用了一系列命令行工具来从WSL中的共享中运行内容(例如java
).
I share my Windows 10 filesystem with the Windows Subsystem for Linux. I keep my coding projects in the dev
folder in my user directory, and share that to /mnt/c/Users/Conan/dev
in WSL. Intellij runs projects from the Windows filesystem, but I use a range of command-line tools to run things (such as java
) from the share in WSL.
当我启动Intellij时,它说:
When I start Intellij it says:
文件系统区分大小写不匹配
该项目似乎位于区分大小写的文件系统上.
这与IDE设置不匹配(由属性"idea.case.sensitive.fs"控制)
Filesystem Case-Sensitivity Mismatch
The project seems to be located on a case-sensitive file system.
This does not match the IDE setting (controlled by property "idea.case.sensitive.fs")
这是正确的吗?我的Windows文件系统不区分大小写,但是文件是从WSL中的bash创建的.我应该使用哪个设置?
Is this correct? My Windows filesystem is not case-sensitive, but the files were created from bash in WSL. Which setting should I use?
推荐答案
比使Linux目录不区分大小写更好的解决方案.使您使用的Windows目录区分大小写.请参阅 https://blogs .msdn.microsoft.com/commandline/2018/02/28/per-directory-case-sensitivity-and-wsl/
Better solution than making the Linux directory case-insensitive. Make the Windows directory you are using case-sensitive. See https://blogs.msdn.microsoft.com/commandline/2018/02/28/per-directory-case-sensitivity-and-wsl/
这将带来更完整的Linux体验,并避免了诸如此处所述的互操作问题.
This makes for a more complete Linux experience and avoids interop issues such as described here.
此外,我建议通过wsl.conf(手动在/etc中创建)利用版本17134(4月更新或1803)或更高版本的Windows中可用的元数据选项.这将允许您的Windows目录保留您使用WSL运行的linux发行版分配的权限.请参阅 https://blogs.msdn.microsoft.com /commandline/2018/02/07/automatically-configuring-wsl/
In addition, I recommend utilizing the metadata option available in build 17134 (April Update or 1803) or newer for Windows via wsl.conf (manually create in /etc). This will allow your windows directories to keep the permissions assigned by the linux distro you're running with WSL. See https://blogs.msdn.microsoft.com/commandline/2018/02/07/automatically-configuring-wsl/
这篇关于我应该告诉Intellij我的WSL文件系统区分大小写吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!