study/기타

zsh: command not found: code / 비주얼 스튜디오 코드 code . 실행 안될 때

FYE 2023. 1. 13. 11:35
터미널에서 비주얼 스튜디오 코드가 안 열림 = code .가 실행 안됨
zsh: command not found: code

 

 

 

 

command palette에 Shell Command: Install 'code' command in PATH 입력하니 이렇게 뜸

 

EACCES: permission denied, unlink 'usr/local/bin/code'

 

 

 

🔨 해결방안

 

1. bin 디렉토리 → code를 지운 후 다시설치
cd /usr/local/bin
sudo rm -rf code

여기서 바로 install code 해도 된다는 글 봤는데 나는 안되길래

 

 

 

2. Command Palette열기

(Show All Commands 단축키 Mac : cmd + shift + p / window : ctr + shift + p)

 

 

 

3. Shell Command: Install 'code' command in PATH 입력 → code 다시 설치