본문 바로가기

리눅스

우분투(Ubuntu) apt 저장소(repository) 변경하기

728x90
반응형

우분투(Ubuntu) apt 저장소(repository) 변경하기

Ubuntu에서는 apt를 사용하여 패키지 관리를 합니다. apt 저장소는 패키지를 다운로드하는 곳으로, 기본 저장소 이외에 다른 저장소를 추가할 수 있습니다. 

 

apt 저장소 목록 파일 열기

vim /etc/apt/sources.list

 

apt 저장소 주소 변경

  • vim의 치환 가능을 이용하여 변경
:%s/kr.archive.ubuntu.com/mirror.kakao.com/g

여기서 RELEASE는 사용하는 Ubuntu 버전의 코드 이름입니다.
예를 들어, Ubuntu 22.04 LTS를 사용하는 경우 jammy을 사용합니다. main, restricted, universe, multiverse는 패키지의 유형을 지정합니다.

 

apt 저장소 업데이트

apt-get update

Ubuntu용 공식 아카이브 미러(Official Archive Mirrors for Ubuntu)

https://launchpad.net/ubuntu/+archivemirrors


sed 명령으로 apt 저장소 변경

sed -i 's/kr.archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list

apt 저장소 업데이트

apt-get update

 

728x90
반응형