This simple tutorial shows how to speed up the downloading process of snap application package by associating IP address with the snapcraft server in Ubuntu.
Snap is a containerized package format, that makes many great applications (e.g., Spotify, Skype, the latest Blender, and more) easy to install in Ubuntu 18.04 and higher.
However snap is LARGE in file size. Due to slow international network speed, downloading a snap in 20MB even take more than half an hour in my case.
1.) Open terminal either via Ctrl+Alt+T keyboard shortcut or by searching for ‘terminal’ from application menu. When terminal opens, run command:
In the terminal output, copy the IP address under ‘ANSWER SECTION’:
2.) Then run commands to edit the hosts file:
sudo gedit /etc/hosts
Type user password (no asterisk) when it prompts and hit Enter.
When the files opens in gedit text editor, paste following line:
Replace the IP address with which you got in step 1, and finally save the file.
That’s it. Enjoy!
This should be published on theonion
worked like a charm Ubunto 19.1 January 10 2019
Works beautifully! Totally recommend it!
Thanks for this!
OMG, it works. Thanks, dude!
not showing any answer !!
Same case, no “Answer Section”
; <> DiG 9.16.1-Ubuntu <> fastly.cdn.snapcraft.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39782
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;fastly.cdn.snapcraft.io. IN A
;; Query time: 747 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Jul 03 12:36:37 -05 2020
;; MSG SIZE rcvd: 52
no answer section showed