2

I'm on Windows 10, installed WSL2 with Ubuntu v20 and then I installed Oh My Zsh. I thought I had everything working but when I went to type code ., in my Ubuntu terminal I got the error zsh: command not found: code.

When I do echo $PATH I get: /home/robbie/.nvm/versions/node/v18.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/robbie/.yarn/bin

My .zshrc file looks like (I removed a bunch of the comments for this snippet):

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="agnoster"
plugins=(git node npm nvm z yarn)

source $ZSH/oh-my-zsh.sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

source /home/robbie/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

On VSCode I have the Remote WSL extension installed and set default/enabled on Ubuntu under Remote Explore.

In Windows 10 under Environment Variables, under Path I have a variable C:\Users\RobbieC\AppData\Local\Programs\Microsoft VS Code\bin

I have tried uncommenting export PATH=$HOME/bin:/usr/local/bin:$PATH - shutting down WSL, rebooting, no luck. I tried uninstalling/reinstalling the Remote WSL extension, rebooting computer, etc. No luck.

RobbieC
  • 422
  • 3
  • 17

1 Answers1

2

Open your regular Debian terminal App(Ensure you are in the debian home directory). Type ls -la there you will find the .zshrc file. Then remove the VScode Path you added.

Chiisom
  • 41
  • 6