Setting up Cursor in WSL

Hello, I recently purchased a subscription for Cursor.

I’m having problem setting up Cursor to work properly on WSL2.

When I open a repo folder on WSL using Cursor, it shows a lot of files are modified, for example:

this is output from powershell terminal

PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\Ubuntu\home\dai\vllm> git diff .\format.sh 
diff --git a/format.sh b/format.sh 
old mode 100755 
new mode 100644

and output from wsl terminal

(base) dai@LAPTOP-V4V5MN7P:~/vllm$ git status 
On branch main 
Your branch is up to date with 'origin/main'. 
 nothing to commit, working tree clean

How do I setup Cursor so it doesn’t run git from Windows powershell ? Using VScode on WSL does not have this issue.

  1. Versions
Version: 0.50.5 (user setup)
VSCode Version: 1.96.2
Commit: 96e5b01ca25f8fbd4c4c10bc69b15f6228c80770
Date: 2025-05-18T04:26:31.444Z
Electron: 34.3.4
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

  1. Steps to start cursor
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\daida> wsl
Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.167.4-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge

This message is shown once a day. To disable it please create the
/home/dai/.hushlogin file.
(base) dai@LAPTOP-V4V5MN7P:/mnt/c/Users/daida$ cd
(base) dai@LAPTOP-V4V5MN7P:~$ cd vllm/
(base) dai@LAPTOP-V4V5MN7P:~/vllm$ cursor .
(base) dai@LAPTOP-V4V5MN7P:~/vllm$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
(base) dai@LAPTOP-V4V5MN7P:~/vllm$

I solved it by installing the WSL extension for Cursor :blush: