본문 바로가기

리눅스

[draft] 우분투에서 APT 저장소를 카카오 미러로 변경하는 방법

728x90

우분투 24.04에서 APT 저장소를 카카오 미러로 변경하는 방법

$ cat /etc/apt/sources.list
# Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources
$ cat /etc/apt/sources.list.d/ubuntu.sources
Types: deb
URIs: http://kr.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Note: noble는 우분투 24.04의 코드명입니다.

1. 파일 편집

kr.archive.ubuntu.com과 security.ubuntu.com을 mirror.kakao.com으로 변경합니다.

sudo vim /etc/apt/sources.list.d/ubuntu.sources
Types: deb
URIs: http://mirror.kakao.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://mirror.kakao.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

(또는) sed 명령어를 사용하여 변경

sudo sed -i.bak 's|http://kr.archive.ubuntu.com/ubuntu/|http://mirror.kakao.com/ubuntu/|g' /etc/apt/sources.list.d/ubuntu.sources
sudo sed -i.bak 's|http://security.ubuntu.com/ubuntu/|http://mirror.kakao.com/ubuntu/|g' /etc/apt/sources.list.d/ubuntu.sources

2. APT 업데이트

apt 캐시를 업데이트합니다.

sudo apt update

 

728x90