[Quick Tip] Speed Up Installing (Downloading) Snap App in Ubuntu

Last updated: April 24, 2024

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:

dig fastly.cdn.snapcraft.io

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: fastly.cdn.snapcraft.io

Replace the IP address with which you got in step 1, and finally save the file.

That’s it. Enjoy!


I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

8 responses to [Quick Tip] Speed Up Installing (Downloading) Snap App in Ubuntu

  1. This should be published on theonion

  2. worked like a charm Ubunto 19.1 January 10 2019

  3. Works beautifully! Totally recommend it!

  4. Thanks for this!

  5. OMG, it works. Thanks, dude!
    Ubuntu 20.04

  6. not showing any answer !!

    • Same case, no “Answer Section”

      dig fastly.cdn.snapcraft.io

      ; <> 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

      ; EDNS: version: 0, flags:; udp: 65494
      ;fastly.cdn.snapcraft.io. IN A

      ;; Query time: 747 msec
      ;; SERVER:
      ;; WHEN: Fri Jul 03 12:36:37 -05 2020
      ;; MSG SIZE rcvd: 52

  7. no answer section showed