Post

Windows Subsystem for Linux (WSL) Package 서버 변경


Package 서버 변경


WSL에서 사용하던 APT 패키지 서버에 문제가 발생하거나 속도가 느려져서 답답하다면, 패키지 서버의 주소를 변경해 볼 수 있다.

vi 에디터로 /etc/apt/sources.list를 열고 패키지 서버 주소를 변경해주면 된다.

1
sudo vi /etc/apt/sources.list
1
2
:%s/deb http:\/\/archive.ubuntu.com/deb http:\/\/mirror.kakao.com/g
:%s/deb http:\/\/security.ubuntu.com/deb http:\/\/mirror.kakao.com/g

Image

APT 패키지 서버 주소를 변경한 다음, 아래 명령어를 이용하여 기존의 패키지 리스트를 삭제해준다.

1
2
sudo rm -rf /var/lib/apt/lists/*
sudo apt clean

그리고 APT 패키지 리스트를 다시 update 해보면, 서버 주소를 변경하기 전보다 훨씬 빨라진 것을 느낄 수 있다.

1
sudo apt update

Image

This post is licensed under CC BY 4.0 by the author.

© sirius-mhlee. Some rights reserved.

Using the Chirpy theme for Jekyll.