Carpe diem
WSL을 다른 drive에 설치 본문
WSL을 이용해서 설치된 리눅스 배포판은 C드라이브에 설치된다.
C드라이브는 용량이 부족할 수 있어서..
D드라이브에 설치하는 방법을 알아봤다.
powershell에서 아래 명령으로 다운로드, 설치를 하면 된다.
더 자세한 내용은 아래 URL을 참고
https://learn.microsoft.com/en-us/windows/wsl/install-manual#downloading-distributions
마지막의 Add-AppxPackage 명령을 사용하지 않고,(root계정으로 로그인된다.)
폴더탐색기에서 드라이브를 열어서 실행시켜도 Ubuntu가 설치된다.(사용자 계정 만드는 창이 먼저 뜬다)
> Set-Location E:
> Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
> Add-AppxPackage .\Ubuntu.appx
Add-AppxPackage 명령을 사용 후에, 더블 클릭한 뒤에 시작하는게 맞다..(MS 공식가이드)
Once the Appx package has finished downloading, you can start running the new distribution by double-clicking the appx file. (The command wsl -l will not show that the distribution is installed until this step is complete).
이전에 설치한 Ubuntu가 있다면 깔끔히 제거한 뒤에 위의 설치 과정을 거쳐야한다.
제거하는 과정은 아래 처럼 하면 된다.
시작버튼 -> 프로그램 추가/제거 -> Ubuntu 모두 삭제
power shell 에서 wsl -l 명령 입력.
남은 것이 있다면, 아래 명령을 입력
wsl --unregister Ubuntu-20.04
다시 설치하면 된다.
'개발환경, 툴' 카테고리의 다른 글
WSL 설정(WslRegisterDistribution failed with error: 0x800701bc) (0) | 2023.01.19 |
---|---|
window에 ssh key 생성 (0) | 2023.01.08 |