Open bashrc
nano ~/.bashrc
Add this on the end of the file:
export PATH=$PATH:/mnt/c/Users/<YourUsername>/AppData/Local/Programs/Microsoft\ VS\ Code/bin
Apply the changes:
source ~/.bashrc
Test the code command: Now, try running code . in the WSL2 terminal again:
code .
Top comments (0)