$sudo cp /etc/apt/sources.list /etc/apt/sources.list.bk
2.到Official Archive Mirrors for Ubuntu 查詢台灣下載伺服器
(1)進入網站後,按下[Ctrl+F]->輸入[Taiwan]->按下[Enter],即可搜尋。
(2)選擇一個連結,進去後,選擇ubuntu的版本,如下圖所示。
(3)可得到更新的下載伺服器
其內容為:
deb http://free.nchc.org.tw/ubuntu/ xenial maindeb-src http://free.nchc.org.tw/ubuntu/ xenial main
(4)現在依序將內容整理如下:
deb http://free.nchc.org.tw/ubuntu/ xenial main
deb-src http://free.nchc.org.tw/ubuntu/ xenial main
deb http://ftp.ubuntu-tw.net/ubuntu/ xenial main
deb-src http://ftp.ubuntu-tw.net/ubuntu/ xenial main
deb http://ftp.tku.edu.tw/ubuntu/ xenial main
deb-src http://ftp.tku.edu.tw/ubuntu/ xenial main
deb http://ftp.yzu.edu.tw/ubuntu/ xenial main
deb-src http://ftp.yzu.edu.tw/ubuntu/ xenial main
deb http://mirror.nwlab.tk/ubuntu/ xenial main
deb-src http://mirror.nwlab.tk/ubuntu/ xenial main
deb http://ftp.ntou.edu.tw/ubuntu/ xenial main
deb-src http://ftp.ntou.edu.tw/ubuntu/ xenial main
deb http://ubuntu.cs.nctu.edu.tw/ubuntu/ xenial main
deb-src http://ubuntu.cs.nctu.edu.tw/ubuntu/ xenial main
deb http://ubuntu.stu.edu.tw/ubuntu/ xenial main
deb-src http://ubuntu.stu.edu.tw/ubuntu/ xenial main
deb http://mirror01.idc.hinet.net/ubuntu/ xenial main
deb-src http://mirror01.idc.hinet.net/ubuntu/ xenial main
(5)將其寫成shell
檔名:SourcesListUpdate.sh
內容為:
#!/bin/bash
cp /etc/apt/sources.list /etc/apt/sources.list.bk
echo " " >> /etc/apt/sources.list
echo "deb http://free.nchc.org.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://free.nchc.org.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb http://ftp.ubuntu-tw.net/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://ftp.ubuntu-tw.net/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb http://ftp.tku.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://ftp.tku.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb http://ftp.yzu.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://ftp.yzu.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb http://mirror.nwlab.tk/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://mirror.nwlab.tk/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb http://ftp.ntou.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://ftp.ntou.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb http://ubuntu.cs.nctu.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://ubuntu.cs.nctu.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb http://ubuntu.stu.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://ubuntu.stu.edu.tw/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb http://mirror01.idc.hinet.net/ubuntu/ xenial main" >> /etc/apt/sources.list
echo "deb-src http://mirror01.idc.hinet.net/ubuntu/ xenial main" >> /etc/apt/sources.list
apt-get update -y
資料來源:
1.Official Archive Mirrors for Ubuntu
沒有留言:
張貼留言