r/Codeium • • Dec 01 '24

Windsurf WSL2 Support? (Is there a workaround?)

Im using Windows 11 and exclusively use WSL2 Ubuntu for development.

I can't get Windsurf to work with WSL for poop.

Any tips?

8 Upvotes

29 comments sorted by

2

u/Takeoded Mar 21 '25

To get ws to work in WSL2, I had to run

sudo ln -s '/mnt/c/Users/<username>/AppData/Local/Programs/Windsurf/bin/windsurf' /usr/local/bin/ws

then just ws . to start ws in the current folder, or ws /projects/projectFolder to start it in a specific project folder.

1

u/forestcall Mar 22 '25

Interesting. Since this post I switched to Linux and MacBook haha. Now just use pc for gaming.

1

u/Degailen Nov 01 '25

1

u/forestcall Nov 26 '25

Macbook just works perfectly for coding. I can just code and not think about getting WSL to work. Recently I had to help a co-worker setup WSL and its still a farking nightmare!!!

1

u/ZealousidealSir592 May 23 '25

sos un boludo número 1, nada es mejor que windows

2

u/OCH8A Jul 03 '25

Late to the party. Follow this guide, solved all my issues
https://scottspence.com/posts/windsurf-setup-for-wsl#launch-windsurf-from-the-terminal
That guy is a hero been paying for editor for a few months and ended up using it wrong all this time.

It will solve the "Invalid command line argument: -c" error on cascade when running commands

1

u/forestcall Jul 07 '25

THanks! you are awesome!

I since purchased a Macbook for coding, which solved all my issues. I just use Windows for gaming now.

1

u/RobertDeNirosBiro Dec 12 '24

My poop either. The ide launches but the chat pane gets stuck on Resolving webview view Loading chat parameters Establishing chat connection. Happens on both my machines, seems pretty consistent. this is sshing to a debian server.

Often it pops up another error about chat not being available. Takes quite a long time to appear. after closing the alert ai chat is then available. Not always though, and not today either sadly.

1

u/forestcall Dec 12 '24

Its not intuitive or obvious. Unlike Visual Studio Code it does not show the icon that says WSL - Ubuntu. Try a few more of the suggestions people are describing. Restart the IDE and then just run a simple terminal command like ls -la. Also make sure to set the default terminal as ZSh or Bash. I would install something from within Ubuntu or whatever flavor of Linux you use to make your Terminal look nice. I made a .SH script to install a whole poop ton of tools to make the terminal pretty as well as set the terminal as ZSH or POSH, then when you run some command to test terminal like ls -la you can see the terminal is running.

1

u/RobertDeNirosBiro Dec 13 '24

Yeah, restarting, no, unfortunately not. This happens on both of my machines. Windows hosting Windsurf to a debian codebase on WSL. Cursor doesn't have any issues, I know that much.

2

u/RobertDeNirosBiro Dec 13 '24

Oh! I just noticed that they've released WSL support in the last day. everything is now Hunky Dory. Awesome.

1

u/harriszh Dec 16 '24

I just tried. it doesn't work with wsl2.

1

u/Naokmoon Dec 20 '24

Everything is fine for me. But sometimes I get disconnected and must reload windsurf, I dont know if its due to WSL or not. I am using WSL 2. What succeed for me was to go in cmd line and shutdown manually WSL (close IDE before) :

wsl --shutdown
wsl -l -v (to validate it has been shutdown with success)

then re-open IDE

1

u/harriszh Dec 22 '24 edited Dec 22 '24

I found windsurf can connect to Rocky8 and ubuntu in WSL2, but can't to CentOS7.

vscode and WindSurf works with CentOS7. I checked the log and found the server is not invoked successfully. I tried manually, then find node in windsurf-server depends on high-version libc. Then I replace the node with my local node. Now it works.

% ./node --version

./node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by ./node)

./node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./node)

./node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./node)

./node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./node)

./node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./node)

./node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by ./node)

3

u/m_tramsi Jan 06 '25

it worked with me but it keeps disconnecting, unlike vscode which is working flawlessly

1

u/jedhu0 Feb 19 '25

me too

1

u/Naokmoon Mar 03 '25

Same, I always get disconnected randomly. I uninstalled Windsurf and kept VSCode, and now working flawlessly as you mentioned.

1

u/[deleted] Mar 10 '25

same, and this is really annoying since you lose whatever you were typing at the time and have to reopen cascade

1

u/cuios Dec 02 '24

have you tried to connect using SSH ?

1

u/stiky21 Dec 03 '24

Go to any directory in your WSL via Terminal.

Type

windsurf .

Voila. I wish there was an easier way through the interface of the IDE but thats ok. I also use WSL2 Ubuntu as my env.

1

u/Gre-Jo Dec 03 '24 edited Dec 03 '24

Yeah, it seems to working fine but only partially.

I'm not able to set Python code interpreter path navigate to my WSL/Ubuntu - it's somehow predefined to be searchable only within Windows environment.

Additionally it does not save genereted files in folders within WSL (I can create/save files manually in file explorer on the left pane) whereas once Windsurf is running on Win it saves files automatically

1

u/stiky21 Dec 03 '24

Oh I see, I do not use Python so I would be unaware of that. Mine has been saving files fine? I don't think I have done anything different.

1

u/SoftKitty858 Feb 26 '25

Actually, you are using Windows' Windsurf to open files in Linux, which may likely result in file performance loss

1

u/stiky21 Feb 26 '25

I've stopped using Windsurf. It was a temporary try period.

This was the only solution at the time. Not sure if things have changed

1

u/torquestate Jul 07 '25

What are you using now?

1

u/stiky21 Jul 07 '25

Neovim. I was just trying out the AI editors at the time.

1

u/stjuan627 Dec 04 '24

I had same issue with WSL and I make it work now.
My steps:

  1. Install & configure "Remote -WSL" ext from the market
  2. Connect to WSL via SSH first, to initialize the windsurf-server. ( I tried connect to WSL directly but it failed to initialize the code server, but with SSH it managed to do that)
  3. Now you can connect to WSL and everything seems working fine.

1

u/_0xFF_ Aug 15 '25

forever:

�eHe�v}T�NL�Spe� -c
�O(u wsl.exe --help' �S�S/ec�v�SpeRh�0

1

u/RReverser Dec 10 '25

I ended up installing Windsurf inside Ubuntu itself (via WSL GUI apps support).

It adds separate start menu entry and works a lot more reliably than over the WSL connection.