# Cursor Symlinks disrupting both Code and Cursor commands

**URL:** <https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577>\
**Category:** Bug Reports\
**Created:** [January 26, 2024, 7:03pm UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577 "2024-01-26T19:03:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![stacho](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@stacho](https://forum.cursor.com/u/stacho)\
**Post date:** [January 26, 2024, 7:03pm UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/1 "2024-01-26T19:03:21Z")

</div>

So I can point directly to executables. But this symlink still appears. How can I get rid of it? There is no apps folder within resources of cursor. Seems like a bug, but the symlinks make me unable to fix it.

 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/d/d6520433ef38e710de3111e84cee1bbe254af0f8.png)

another user with the exact same issue and the exact same way of reproducing it.

> [@Can not using "code" or "cursor" command to open folder](https://forum.cursor.com/t/can-not-using-code-or-cursor-command-to-open-folder/1369):
>
> I installed Cursor and was allowed to “install cursor command” but when I try to open with the “cursor” command in the terminal it does not work. Unfortunately, the “code” command to open with VS code doesn’t work either, Is it a conflict when I installed the “cursor” command? How can I resolve that? This is the error when running “code .” Unable to determine app path from symlink: /c/Users/admin/AppData/Local/Programs/cursor/resources/app/bin/code This is the error when running “cursor .” …

---

<div class="post-metadata">

**Author:** ![Kastan](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@Kastan](https://forum.cursor.com/u/Kastan)\
**Post date:** [January 30, 2024, 12:51pm UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/2 "2024-01-30T12:51:58Z")

</div>

Did you find any fix to this?

---

<div class="post-metadata">

**Author:** ![a-hussien](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/a-hussien/32/1337_2.png) [@a-hussien](https://forum.cursor.com/u/a-hussien)\
**Post date:** [February 25, 2024, 10:39am UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/3 "2024-02-25T10:39:58Z")

</div>

- For VS code command to work reorder the “code” command above the “cursor” command in your system environment variables.

- For Cursor :

I just updated the cursor file which is located in the path “/c/Users/pc\_username/AppData/Local/Programs/cursor/resources/app/bin/”

- removed /… from VSCODE\_PATH variable
- updated last variables to be:

```auto
ELECTRON="$VSCODE_PATH/cursor.cmd"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" --ms-enable-electron-run-as-node "$@"
exit $?

```

---

<div class="post-metadata">

**Author:** ![hari](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/hari/32/1648_2.png) [@hari](https://forum.cursor.com/u/hari)\
**Post date:** [March 27, 2024, 4:32pm UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/4 "2024-03-27T16:32:25Z")

</div>

can you pls explain in detail?

---

<div class="post-metadata">

**Author:** ![a-hussien](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/a-hussien/32/1337_2.png) [@a-hussien](https://forum.cursor.com/u/a-hussien)\
**Post date:** [April 2, 2024, 10:55am UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/5 "2024-04-02T10:55:41Z")

</div>

> [@hari](#):
>
> explain

Hello Hari,  
Which part do you want me to explain?

---

<div class="post-metadata">

**Author:** ![geezy](https://avatars.discourse-cdn.com/v4/letter/g/e9a140/32.png) [@geezy](https://forum.cursor.com/u/geezy)\
**Post date:** [August 5, 2024, 4:27am UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/6 "2024-08-05T04:27:37Z")

</div>

For Windows `code` symlink:  
There are 2 (maybe more can work) ways that worked for me -  
A.

1. Go here and remove all the files named `code`:  
`c:\Users\<username>\AppData\Local\Programs\cursor\resources\app\bin`
2. Restart your terminal

B. As @a-hussien mentioned,  
“ **Move up** ” your `VScode` path upon the `cursor` path on the environment variables’ **Path** table:  
 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/4/49d013d2a849b0acc7aebc4bdc8554330809e8db.png)

In my case, the `VScode` path was inside the “user **Path** variables” table, and the `cursor` path was inside the “system **Path** variables” table. I added the `VScode` path (copied from the “user…table”) to the “system…table” and moved it up.

If we’re in the same boat, now, you have a choice to make.  
Either take both to the same table and reorder, or delete one from one table and add to the other.

However, be careful, system **Path** variables get higher priority over user **Path** variables!

Some ref:

> [@How to prevent the "code . " command in the terminal from opening Cursor](https://forum.cursor.com/t/how-to-prevent-the-code-command-in-the-terminal-from-opening-cursor/1983/5):
>
> If you’re in Windows, open Run (Win+R) and type: %localappdata%\Programs\cursor\resources\app\bin Delete two files: code code.cmd I hope this helped.

---

<div class="post-metadata">

**Author:** ![zephop](https://avatars.discourse-cdn.com/v4/letter/z/bb73d2/32.png) [@zephop](https://forum.cursor.com/u/zephop)\
**Post date:** [August 28, 2024, 4:09am UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/7 "2024-08-28T04:09:08Z")

</div>

Please fix this for WSL as well or i would say Linux in general

 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/f/ff8751b593f1111090aaf69a567eb6f8ad46130d.jpeg)

---

<div class="post-metadata">

**Author:** ![anon-9002714](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@anon-9002714](https://forum.cursor.com/u/anon-9002714)\
**Post date:** [September 3, 2024, 12:59am UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/8 "2024-09-03T00:59:46Z")

</div>

Hello, I tried your method and put cursor and VSCODE into the system environment variable with VSCODE on it. But I still report an error:

```auto
hint: Waiting for your editor to close the file... Unable to determine app path from symlink : /c/Users/xxx/AppData/Local/Programs/cursor/resources/app/bin/code
error: There was a problem with the editor 'code --wait'.

```

Is there any better way to solve this please? Thank you so much!

---

<div class="post-metadata">

**Author:** ![hal2k](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/hal2k/32/40913_2.png) [@hal2k](https://forum.cursor.com/u/hal2k)\
**Post date:** [September 5, 2024, 10:34am UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/9 "2024-09-05T10:34:32Z")

</div>

You can easily fix the `code .` extension for VS Code by changing the order of your paths in your $PATH environment variable. Ensure that VS Code is before cursor, and that you add “” when exporting the updated path in WSL.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [December 21, 2025, 8:58am UTC](https://forum.cursor.com/t/cursor-symlinks-disrupting-both-code-and-cursor-commands/2577/10 "2025-12-21T08:58:48Z")

</div>

Closed on December 21, 2025, 8:58am UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
