WSL2 Setting

SSW·2022년 11월 15일
0

WSL2

목록 보기
1/2

1. Linux용 Anaconda 다운로드

Anaconda 설치 page

wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh

쉘 파일로 anaconda 설치

sh Anaconda3-2022.10-Linux-x86_64.sh

2. VScode 연동

VScode Extension에서 WSL 설치

VScode Extentions에서 Remote Development 설치

Remote Explorer에서 WSL 환경에 접속

Ubuntu 업데이트

sudo apt-get update

wget 및 ca-certificate 추가

sudo apt-get install wget ca-certificates

WSL에 VScode 연동

code .

3. zhc에 환경변수 추가

VS Code로 zshrc 열기

code ~/.zshrc

zshrc에 Conda 경로 추가 및 conda initialize 내용 추가

export PATH=~/home/ssw/anaconda3/bin:$PATH

# >>> conda initialize >>>
 # !! Contents within this block are managed by 'conda init' !!
 __conda_setup="$('/home/ssw/anaconda3/bin/conda' 'shell.zsh' 'hook'     2> /dev/null)"
 if [ $? -eq 0 ]; then
     eval "$__conda_setup"
 else
     if [ -f "/home/ssw/anaconda3/etc/profile.d/conda.sh" ]; then
         . "/home/ssw/anaconda3/etc/profile.d/conda.sh"
     else
         export PATH="home/ssw/anaconda3/bin:$PATH"
     fi
 fi
 unset __conda_setup
 # <<< conda initialize <<<

terminal에서 source로 update

source ~/.zshrc

conda 실행 확인

conda --version

4. WLS과 Windows 파일 공유

가장 상위 경로에서 이동

cd /mnt/c  # C drive
cd /mnt/d  # D drive

5. WSL2 파일 복사 붙여넣기 활성화

아이콘 우클릭 -> 속성(P)

Ctrl+Shift+C/V를 복사(C)/붙여넣기로 사용 check

profile
ssw

0개의 댓글