우분투 저장소 변경

124.53.35.193 (토론)님의 2017년 9월 10일 (일) 23:25 판 (→‎실행예시)
우분투 저장소 변경

1 명령어

cp /etc/apt/sources.list ~/sources.list.old
sed -i 's/us.archive.ubuntu.com/ftp.daum.net/g' /etc/apt/sources.list
diff ~/sources.list.old /etc/apt/sources.list | wc -l

2 실행예시

root@ubuntu:~# cp /etc/apt/sources.list ~/sources.list.old
root@ubuntu:~# sed -i 's/us.archive.ubuntu.com/ftp.daumkakao.com/g' /etc/apt/sources.list
root@ubuntu:~# diff ~/sources.list.old /etc/apt/sources.list | wc -l
38
root@ubuntu:~# diff ~/sources.list.old /etc/apt/sources.list | tail
> deb http://ftp.daumkakao.com/ubuntu/ precise multiverse
> deb-src http://ftp.daumkakao.com/ubuntu/ precise multiverse
> deb http://ftp.daumkakao.com/ubuntu/ precise-updates multiverse
> deb-src http://ftp.daumkakao.com/ubuntu/ precise-updates multiverse
44,45c44,45
< deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
< deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
---
> deb http://ftp.daumkakao.com/ubuntu/ precise-backports main restricted universe multiverse
> deb-src http://ftp.daumkakao.com/ubuntu/ precise-backports main restricted universe multiverse

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}