Select and Set The Fastest Ubuntu APT Mirror by Commands
            
                
            
        
        
            From here .
- Download the “netselect“ pacakge and install it.
| 12
 
 | wget http://ftp.us.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-29_amd64.debsudo dkpg -i netselect_0.3.ds1-29_amd64.deb
 
 | 
- Run the following command to get the fastest apt mirrors(top 10).
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 
 | sudo netselect -v -s10 -t20 `wget -q -O- https://launchpad.net/ubuntu/+archivemirrors | grep -P -B8 "statusUP|statusSIX" | grep -o -P "(f|ht)tp://[^\"]*"`
 159 http://mirrors.pardisco.co/ubuntu/
 165 http://mirror.arvancloud.com/ubuntu/
 283 http://mirrors.pardisco.co/ubuntu/
 294 http://ftp.tsukuba.wide.ad.jp/Linux/ubuntu/
 305 http://linux.yz.yamagata-u.ac.jp/ubuntu/
 314 http://mirror.arvancloud.com/ubuntu/
 315 http://linux.yz.yamagata-u.ac.jp/ubuntu/
 318 http://ftp.udx.icscoe.jp/Linux/ubuntu/
 334 http://mirror.telkomuniversity.ac.id/ubuntu/
 335 http://mirrors.skyshe.cn/ubuntu/
 
 | 
- Update the “/etc/apt/sources.list” file content by using the selected mirror.
| 12
 
 | sudo vi /etc/apt/sources.list:%s/cn.archive.ubuntu.com/mirror.arvancloud.com/g
 
 | 
- Update the apt package info and upgrade.
| 12
 
 | sudo apt-get updatesudo apt-get dist-upgrade
 
 |