While I think using "locate" to search files on my disks (C: and externals) would be quite useful, I worry the likelihood using locate and/or (sudo) updatedb might cause some serious problems on the Windows system (C:). For example on the other day I used "stat" to a bunch of files including some system files or kinds, the WSL stopped working and unable to kill, I needed to reboot the machine. Fortunately it seemed it didn't cause any problem on my machine, I'm concerning using locate or updatedb to scan all the files may make WSL crash or at worst make Windows system crash.

So, is it safe to use locate/updatedb on Windows WSL linux (ubuntu etc)?

  • There is a fork(?) for Windows called Locate32.
    – Daniel B
    Jun 10, 2021 at 18:54
  • @DanielB I was curious about that. I couldn't tell if Locate32 used the same database format. If so, then the OP could still use the Linux locate command in WSL with a LOCATE_PATH variable to search both the Linux and Windows dbs. Jun 11, 2021 at 18:36

1 Answer 1


I wouldn't recommend it, just for performance reasons alone, especially if you are running WSL2. WSL1 uses drvfs to access files under Windows, which is still slow than a "native" Linux filesystem, but WSL2 uses 9P, which can be up to 10x slower than WSL1 if you are accessing many small files.

There are some alternatives that are native Windows. I'd probably just deal with having two separate commands/databases to search -- One for WSL/Linux, and the other for Windows drives/files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.