Ubuntu 12.04設定讓apt-get自動取得最佳鏡射站台

參考來源:How can I get apt to use a mirror close to me, or choose a faster mirror?

步驟:

  1. sudo vi /etc/apt/sources.list
  2. 檔案最上方直接加入以下文字:
deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse

其他Ubuntu版本請自行替換precise字串對應以下版本:

  • lucid (10.04)
  • maverick (10.10)
  • natty (11.04)
  • oneiric (11.10)
  • raring (13.04)
  • saucy (13.10)
  • trusty (14.04)