Skip to content

Instantly share code, notes, and snippets.

@tranduydat
Created January 23, 2023 08:24
Show Gist options
  • Save tranduydat/b83f3d127dafb5171e5509390a56569d to your computer and use it in GitHub Desktop.
Save tranduydat/b83f3d127dafb5171e5509390a56569d to your computer and use it in GitHub Desktop.
Get fastest apt
# https://askubuntu.com/questions/39922/how-do-you-select-the-fastest-mirror-from-the-command-line
curl -s http://mirrors.ubuntu.com/mirrors.txt | xargs -n1 -I {} sh -c 'echo `curl -r 0-102400 -s -w %{speed_download} -o /dev/null {}/ls-lR.gz` {}' |sort -g -r |head -1| awk '{ print $2 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment