5

The download speed in Terminal is very slow. about 40kBytes. But the speed in the browser works fine I have chosen the best server but I still get the problem by the way loot at the output of tracepath 1.1.1.1 output if it helps:enter image description here

Aria P74
  • 125

1 Answers1

3

If you are getting fast speed in the browser and only slow speed for installing packages, the network mirror might be having a problem. You can use netselect package, as it guarantees the fastest mirror selection.

The netselect package is not available within Ubuntu's standard repository by default, so we will need to download it from Debian stable repository. So, run these commands

wget http://ftp.ru.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-26_amd64.deb
sudo dpkg -i netselect_0.3.ds1-26_amd64.deb

Once you have the netselect command available on your Ubuntu system use it to locate the fastest mirror based on the lowest ICMP latency. The netselect output will be relative to your location. The output will show the top 20 apt Ubuntu mirrors ( if available ):

sudo netselect -s 20 -t 40 $(wget -qO - mirrors.ubuntu.com/mirrors.txt)

Manually alter your /etc/apt/sources.list file to reflect the above netselect results

sudo nano /etc/apt/sources.list

or use sed command, where the lower score number on the left represents a higher mirror transfer rate. Example:

sudo sed -i 's/http:\/\/us.archive.ubuntu.com\/ubuntu\//http:\/\/ubuntu.uberglobalmirror