Is there WSL2 support?

+1 on this. I love how I can do code . from within WSL to open the folder in VS Code. After following all the steps with the latest version this is still not working for me.

1 Like

I can’t connect to my Ubuntu 20.04 Distro of WSL2, it just shows “Opening Remote” and "Starting VS Code in WSL (Ubuntu-20.04) forever it seems.

I cannot connect to Ubuntu-22.04 on WSL2. Is there any solution?

Hi! Sorry about this! What version are you on? Has WSL ever worked for you?

Hey! Do things work if you run the Fix WSL command from Ctrl + Shift + P? And then try to reconnect? Our patch tries to inject a .cursor-server/server-env-setup file which seems to be nonexistent for you.

If that doesn’t work, could you report the output of the following command in Powershell (after replacing YOUR_WINDOWS_USERNAME):

powershell.exe -ExecutionPolicy Bypass -File "C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app\bin\fixWSLNew.ps1" -pathToAdd "C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app" -scriptPath "C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app\bin\server-env-setup"

I am using windows 11 and the version of Cursor is 0.17.0., WSL is 2.0.9.0. I usually use VSCode to connect to WSL.

Fix WSL Install becomes “recently used” and I try to reconnect, but I still get the same error.

I was having the same errors, and executing this command solved it. Thank you!

1 Like

I’m having the same issues as everyone else.

/mnt/c/Users/xx/AppData/Local/Programs/cursor/resources/app/bin/cursor: 62: /mnt/c/Users/xx/AppData/Local/Programs/cursor/resources/app/bin/../cursor: not found

When i run the the fix WSL install script command inside of cursor, it does nothing, except uninstall all my WSL extensions. It doesn’t help with launching cursor from the WSL terminal.

My workaround is just opening folders from within cursor.

1 Like

For anyone that is looking for a fix to the opening cursor from the terminal issue. There’s a github issue that proposes a fix.

It’s done by user ddwang. Here’s the link to his github gist.

It works. However the downside is that it downloads the vscode server everytime you use it in a new terminal, unlike vscode where it only downloads it once. If anyone has the time to fix that issue, that would be cool, please share if you do. It’s in my to-do list, just haven’t gotten around to it.

1 Like

Has there been any update for this?

1 Like

I’m having the same problem as @jqlive and @k-ta … running the script provided by @truell20 did not fix the issue for me :frowning:

Just paid for a year sub and hit this issue instantly. I can’t launch cursor from my wsl2 terminal typing “code .” or “cursor .” - but if I open cursor from Windows and connect to WSL, it works successfully. Re-opening cursor through Windows maintains the WSL2 connection.

p@YODA:~$ code .
Unable to determine app path from symlink : /mnt/c/Users/p/AppData/Local/Programs/cursor/resources/app/bin/code
p@YODA:~$ cursor .
To use Cursor with the Windows Subsystem for Linux, please install Cursor in Windows and uninstall the Linux version in WSL. You can then use the cursor command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N] y
To no longer see this prompt, start Cursor with the environment variable DONT_PROMPT_WSL_INSTALL defined.
/mnt/c/Users/p/AppData/Local/Programs/cursor/resources/app/bin/cursor: 62: /mnt/c/Users/p/AppData/Local/Programs/cursor/resources/app/bin/…/cursor: not found

1 Like

Can confirm this is happening for me. Nothing works so far:

  • Tried uninstalling/re-installing cursor
  • Tried “Fix WSL Install” command via Cmd+Shift+P
  • Tried: powershell.exe -ExecutionPolicy Bypass -File “C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app\bin\fixWSLNew.ps1” -pathToAdd “C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app” -scriptPath “C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app\bin\server-env-setup”

Using “Connect to WSL” command and then using terminal within Cursor works, but this terminal doesn’t have all my bash_profile settings, so it’s not usable.

I guess I’ll hold off on buying a Cursor subscription until this is fixed.

I got it working by forking @ddwang’s script – This fixes using "cursor" command in WSL · GitHub

Spent way too many hours debugging this.

The default “cursor” script is a Mac-only script. It doesn’t work with WSL at all. That’s why it complains when you try to run it.

2 Likes
asuna@ASUNA:~$ type code
code is /mnt/c/Users/tejsr/AppData/Local/Programs/cursor/resources/app/bin/code
asuna@ASUNA:~$ code
Unable to determine app path from symlink : /mnt/c/Users/tejsr/AppData/Local/Programs/cursor/resources/app/bin/code

I dont cursor run on code in wsl I selected cursor command on installation but its still mapping to code

1 Like

This issue is fixed in today’s 0.41.1 release!

1 Like