Submitted Successfully!
To reward your contribution, here is a gift for you: A free trial for our video production service.
Thank you for your contribution! You can also upload a video entry or images related to this topic.
Version Summary Created by Modification Content Size Created at Operation
1 handwiki -- 1734 2022-10-25 01:37:11

Video Upload Options

Do you have a full video?


Are you sure to Delete?
If you have any further questions, please contact Encyclopedia Editorial Office.
HandWiki. Snap (Package Manager). Encyclopedia. Available online: (accessed on 14 June 2024).
HandWiki. Snap (Package Manager). Encyclopedia. Available at: Accessed June 14, 2024.
HandWiki. "Snap (Package Manager)" Encyclopedia, (accessed June 14, 2024).
HandWiki. (2022, October 25). Snap (Package Manager). In Encyclopedia.
HandWiki. "Snap (Package Manager)." Encyclopedia. Web. 25 October, 2022.
Snap (Package Manager)

Snap is a software packaging and deployment system developed by Canonical for operating systems that use the Linux kernel. The packages, called snaps, and the tool for using them, snapd, work across a range of Linux distributions and allow upstream software developers to distribute their applications directly to users. Snaps are self-contained applications running in a sandbox with mediated access to the host system. Snap was originally released for cloud applications but was later ported to work for Internet of Things devices and desktop applications too.

cloud applications snap deployment

1. Functionality

1.1. Snap Store

The Snap Store allows developers to publish their applications directly to users.[1] With traditional Linux package management approaches like APT or YUM, the applications are packaged and distributed as part of the operating system. This creates a delay between application development and its deployment for end-users.[2][3] In contrast, application developers can publish their applications in the Snap Store and get them directly to users without any intervention from distribution maintainers.

All apps uploaded to the Snap Store undergo automatic testing, including a malware scan. However, Snap apps do not receive the same level of verification as software in the regular Ubuntu archives. In one case in May 2018, two applications by the same developer were found to contain a cryptocurrency miner which ran in the background during application execution. When this issue was found, Canonical removed the applications from the Snap Store and transferred ownership of the Snaps to a trusted third-party which re-published the Snaps without the miner present.[4][5][6] Although the Snap sandbox reduces the impact of a malicious app, Canonical recommends users only install Snaps from publishers trusted by the user.[7][8]

Because packages in the Snap Store are maintained by developers themselves, distribution maintainers cannot ensure packages meet quality standards and are timely updated. In one case, Microsoft left an outdated version of Skype in the Snapcraft store for over a year.[9]

1.2. Universal Linux Packages

Snaps are self-contained packages that work across a range of Linux distributions. This is unlike traditional Linux package management approaches, which require specifically adapted packages for each Linux distribution.[10][11]

Result of command `snap list`: we see installed Skype and IntelliJ IDEA.

The snap file format is a single compressed filesystem using the SquashFS format with the extension .snap. This filesystem contains the application, libraries it depends on, and declarative metadata. This metadata is interpreted by snapd to set up an appropriately shaped secure sandbox for that application. After installation, the snap is mounted by the host operating system and decompressed on the fly when the files are used.[12][13] Although this has the advantage that snaps use less disk space, it also means some large applications start slower.[14][15]

A significant difference between Snap and other universal Linux packaging formats such as Flatpak is that Snap supports any class of Linux application such as desktop applications, server tools, IoT apps and even system services such as the printer driver stack.[1][16][17] To ensure this, Snap relies on systemd for features such as running socket-activated system services in a Snap.[18] This causes Snap to work best only on distributions that can adopt that init system.[19]

1.3. Configurable Sandbox

Applications in a Snap run in a container with limited access to the host system. Using Interfaces, Users can give an application mediated access to additional features of the host such as recording audio, accessing USB devices and recording video.[20][21][22] These interfaces mediate regular Linux APIs so that applications can function in the sandbox without needing to be rewritten. Desktop applications can also use the XDG Desktop Portals, a standardized API originally created by the Flatpak project to give sandboxed desktop applications access to host resources.[23][24] These portals often provide a better user experience compared to the native Linux APIs because they prompt the user for permission to resources such as a webcam at the time the application uses them. The downside is that applications and toolkits need to be rewritten in order to use these newer APIs.

The Snap sandbox also supports sharing data and Unix sockets between Snaps.[25] This is often used to share common libraries and application frameworks between Snaps to reduce the size of Snaps by avoiding duplication.[26][27]

The Snap sandbox heavily relies on the AppArmor Linux Security Module from the upstream Linux kernel. Because only one "major" Linux Security Module (LSM) can be active at the same time,[28] the Snap sandbox is much less secure when another major LSM is enabled. As a result, on distributions such as Fedora which enable SELinux by default, the Snap sandbox is heavily degraded. Although Canonical is working with many other developers and companies to make it possible for multiple LSMs to run at the same time, this solution is still a long time away.[28][29][30]

The Snap sandbox prevents snapped desktop applications from accessing the themes of the host operating system to prevent compatibility issues. In order for Snaps to use a theme, it also needs to be packaged in a separate Snap. Many popular themes are packaged by the Snap developers[31] but some themes are not supported yet[32] and uncommon themes have to be installed manually. If a theme is not available as a Snap package, users have to resort to choosing the best matching theme available.[33] Work is ongoing to make it easier for third parties to package themes in a Snap and to automatically install uncommon system themes.[34]

1.4. Automatic and Atomic Updates

Multiple times a day, snapd checks for available updates of all Snaps and installs them in the background using atomic operation. Updates can be reverted[35][36] and use delta encoding to reduce their download size.[37][38][39]

Publishers can release and update multiple versions of their software in parallel using channels. Each channel has a specific track and risk, which indicate the version and stability of the software released on that channel. When installing an application, Snap defaults to using the latest/stable channel, which will automatically update to new major releases of the software when they become available. Publishers can create additional channels to give users the possibility to stick to specific major releases of their software. For example, a 2.0/stable channel would allow users to stick to the 2.0 version of the software and only get minor updates without the risk of backwards incompatible changes. When the publisher releases a new major version in a new channel, users can manually update to the next version when they choose.[13][40][41][42]

Automatic updates can be turned off using some hacks,[43] also there are many ways to configure updates to suit particular needs. User can choose to remain on a specific major version of the software by specifying the channel, they can configure the update interval to have time to manually check updates, for example this command will check update on the last Friday from 23:00 to 01:00

sudo snap set system refresh.timer=fri5,23:00-01:00

and they can hold updates for up to 60 days. In addition, updates are also automatically disabled on metered connections.[44][45] Even with these controls, a number of users have voiced their complaints about the lack of an option to turn automatic updates completely off.[46]

1.5. Snapcraft

Snapcraft is a tool for developers to package their programs in the Snap format.[47] It runs on any Linux distribution supported by Snap, macOS[48] and Microsoft Windows.[49] Snapcraft builds the packages in a Virtual Machine using Multipass,[50] in order to ensure the result of a build is the same, regardless of which distribution or operating system it is built on.[51] Snapcraft supports a great number of build tools and programming languages such as Go, Java, JavaScript, Python, C/C++ and Rust. It also allows importing application metadata from multiple sources such as AppStream, git, shell scripts and files.[48][52]

2. Adoption

Snap initially only supported the all-Snap Ubuntu Core distribution, but in June 2016, it was ported to a wide range of Linux distributions to become a format for universal Linux packages.[53] Snap requires functionality (systemd) available in most, but not all, Linux distributions some other Unix-like systems do not have (e.g. FreeBSD). Chrome OS does not support Snap directly, only through Linux distros installed in it that support Snap, such as Gallium OS.[54]

A number of Linux distributions support Snap out of the box such as Ubuntu (and e.g. Kubuntu, Xubuntu),[55] Manjaro,[56] Zorin OS,[57] KDE Neon,[58] Solus[59] and Li-f-e.[60] Snap is also available for many other distributions such as CentOS, Debian, Elementary OS, Fedora, GalliumOS, Kali Linux, Linux Mint, OpenEmbedded, Parrot Security OS, Pop! OS, Raspbian, Red Hat Enterprise Linux and openSUSE.[61]

A number of notable Desktop software development companies publish their software in the Snap Store, including Google,[62] JetBrains,[63] KDE,[64] Microsoft (for Linux versions of e.g. .NET Core 3.1,[65] Visual Studio Code, Skype,[66] and PowerShell), Mozilla[67] and Spotify.[68] Snaps are also used in Internet-of-Things environments, ranging from consumer-facing products[69] to enterprise device management gateways[70] and satellite communication networks.[71][72] Finally, Snap is also used by developers of server applications such as InfluxDB,[73] Kata Containers,[74] Nextcloud[75] and Travis CI.[76]

In 2019, Canonical decided to switch the Chromium web browser in future Ubuntu releases from an APT package to a Snap. They explained that Snap made it much easier to support Chromium on all supported Ubuntu releases. This allowed them to focus engineering resources on other parts of the Ubuntu desktop.[1][77] As a result of this decision, Ubuntu derivatives such as Linux Mint had to choose between maintaining their own version of the Chromium package or switching to the snapped version of Chromium maintained by Canonical.

3. Reception

A few companies have praised Snap.[78] Heroku said Snap auto-update fits their fast release schedule well, Microsoft mentioned its ease of use and being yaml-based, as well as it being distribution-agnostic, and JetBrains said the Snap Store gives their tools more exposure.

Red Hat employee Adam Williamson, while acknowledging his own bias, has criticized Snap for keeping the server side closed-source,[79] not having a mechanism for using third party servers,[80] and having to sign a contributor license agreement to contribute to its development.[81]

Clement Lefebvre (Linux Mint founder and project leader[82][83]) has written that Snap is biased and has a conflict of interest. The reasons he cited include it being governed by Canonical and locked to their store, and also that Snap works better on Ubuntu than on other distributions.[84] He later announced that the installing of Snap will be blocked,[85] although a way to disable this restriction will be documented.[86]


  1. S, James; August 6, ers in Software on; 2019; Pst, 8:53 Am. "Why Canonical views the Snap ecosystem as a compelling distribution-agnostic solution" (in en). 
  2. Upgrading packaged Ubuntu application unreasonably involves upgrading entire OS Bug #578045 on by John King (2010-05-10)
  3. Linus Torvalds on the problems of distro packaging Linus Torvalds on DebConf 2014
  4. "How Canonical Is Improving Ubuntu Linux Security". 29 August 2018. 
  5. "Malware Found on the Ubuntu Snap Store" (in en-GB). 2018-05-13. 
  6. Canonical (2018-05-15). "Trust and security in the Snap Store" (in en). 
  7. "Packages for Ubuntu" (in en). 
  8. "Bogus apps in store" (in en-US). 2018-03-27. 
  9. "Hey Microsoft, why is the Skype Snap app hopelessly outdated?" (in en-GB). 2019-07-09. 
  10. June 21, Jack Wallen in Open Source on; 2016; Pst, 8:13 Am. "Canonical changes the game by announcing universal snap packages" (in en). 
  11. Kepes, Ben (2016-06-14). "Snap! Do the Linux distros finally agree on something?" (in en). 
  12. ReadySpace (2019-11-14). "A technical comparison between the snap and the Flatpak formats" (in en-US). 
  13. McKay, Dave. "How to Work with Snap Packages on Linux" (in en-US). 
  14. "Squashfs performance effect on snap startup time" (in en-US). 2019-10-29. 
  15. McKay, Dave. "What You Need to Know About Snaps on Ubuntu 20.04" (in en-US). 
  16. "Call for testing: OpenPrinting's printing-stack-snap (Printing in a Snap)" (in en-US). 2018-03-09. 
  17. "Canonical unveils 6th LTS release of Ubuntu with 16.04". Canonical Ltd.. 
  18. "Services and daemons". 
  19. "WSL2- Ubuntu 20.04 Snap store doesn't work due to systemd dependency · Issue #5126 · microsoft/WSL" (in en). 
  20. "Supported interfaces | Snapcraft documentation" (in en). 
  21. ReadySpace (2019-06-06). "Snapcraft confinement & interfaces" (in zh-hans). 
  22. ReadySpace (2018-11-02). "A guide to snap permissions and interfaces" (in en-US). 
  23. "Flatpak's XDG-Desktop-Portal Adds Initial Support For Snaps - Phoronix". 
  24. "Desktop Integration — Flatpak documentation". 
  25. "The content interface" (in en). 
  26. "Snappy Is Finally Doing Something About Super Large App Sizes" (in en-GB). 2017-06-11. 
  27. "Bundling KDE" (in en). 
  28. Edge, Jake (2019-11-20). "LSM stacking and the future". 
  29. "How Are SNAPS claiming to have no internet plug regulated?" (in en-US). 2020-07-11. 
  30. Johansen, John (3 February 2019). "Containers with Different Security Modules". 
  31. "How to use the system GTK theme via the gtk-common-themes snap" (in en-US). 2020-02-21. 
  32. "Kubuntu 20.04 LTS Review | ORDINATECHNIC". 
  33. "How to Change Snap App Theme on Ubuntu (With Examples)" (in en-GB). 2020-06-18. 
  34. "Automatic theme snap installation notes" (in en-US). 2020-05-25. 
  35. "How to revert to a previous version of a snap package? wekan in this case" (in en-us). 2017-03-08. 
  36. "A Beginners Guide to Snaps in Linux - Part 1" (in en-US). 
  37. "Snapcraft - Snaps are universal Linux packages". 
  38. Willis, Nathan (28 January 2015). "Ubuntu Core and Snappy". Linux Weekly News. 
  39. Vaughan-Nichols, Steven J.. "Ubuntu Snap takes charge of Linux desktop and IoT software distribution". 
  40. "Controlling snap releases with channels, tracks and branches – Part 1" (in en). 
  41. "Controlling snap releases with channels, tracks and branches – Part 2" (in en). 
  42. Prakash, Abhishek. "Using Snap Packages In Ubuntu & Other Linux [Complete Guide"] (in en-US). 
  43. "How to disable autorefresh in snap". 
  44. Logix. "How To Change Snap Refresh (Update) Schedule" (in en-us). 
  45. Pope, Alan (3 March 2020). "Controlling Snap Updates". 
  46. "Disabling automatic refresh for snap from store". 20 May 2017. 
  47. Brodkin, Jon. "Adios apt and yum? Ubuntu's snap apps are coming to distros everywhere". Ars Technica. 
  48. Nestor, Marius (30 January 2019). "Canonical Releases Snapcraft 3.1 Snap Creator Tool with Various Improvements" (in en). 
  49. Nestor, Marius (10 September 2019). "Ubuntu's Snapcraft Snap Creator Tool Will Soon Get a Windows Installer" (in en). 
  50. "Build options | Snapcraft documentation". 
  51. ReadySpace (2019-03-15). "Make your snap development faster" (in zh-hans). 
  52. "Using external metadata | Snapcraft documentation" (in en). 
  53. "Ubuntu's container-style Snap app packages now work on other Linux distributions" (in en-US). 
  54. "Installing snap on GalliumOS | Snapcraft documentation" (in en). 
  55. Hoffman, Chris; PCWorld | (2016-04-18). "Ubuntu 16.04 will support 'Snaps' alongside Deb packages for improved software installation" (in en). 
  56. Evangelho, Jason. "Manjaro Linux 18.1 Is Officially Released, And You Have A New Choice To Make" (in en). 
  57. "And the next version of Zorin OS is… | The official Zorin Blog" (in en-US). 
  58. "KDE Neon to Support Snap Apps in Plasma Discover" (in en-GB). 2017-02-10. 
  59. Strobl, Joshua. "Solus 3 Released" (in en). 
  60. cyberorg (2020-07-07). "Li-f-e: Installing more applications" (in en). 
  61. "Installing snapd | Snapcraft documentation" (in en). 
  62. "Google and Canonical bring Flutter apps to Linux and the Snap Store" (in en-US). 2020-07-08. 
  63. "Install IntelliJ IDEA on Ubuntu with Snaps – IntelliJ IDEA Blog | JetBrains" (in en-US). 
  64. "Month of KDE Applications Snaps – KDE neon Developers' Blog" (in en-US). 
  65. .NET Core 3.1.0 Preview 2, .NET Foundation, 2019-11-08,, retrieved 2019-11-08 
  66. Vaughan-Nichols, Steven J.. "Use Ubuntu's snap to install Skype on any Linux desktop" (in en). 
  67. Hoffman, Chris; PCWorld | (2016-04-25). "Mozilla will provide Firefox as a Snap package for Ubuntu, cutting out the middleman" (in en). 
  68. "Spotify Now Available as a Snap App on Ubuntu" (in en-GB). 2017-12-30. 
  69. Vaughan-Nichols, Stephen J. (11 May 2015). "Ubuntu jumps into Internet of Things with Acer, GE, and Microsoft". ZDNet. 
  70. Sherman, Jordana. "Snappy Core unlocks IoT value within the Dell Edge Gateway 5000 Series". Canonical Ltd.. 
  71. "LimeSDR Mini takes off in satellites". 2018-03-14. 
  72. "Ubuntu Core 18 released for secure, reliable IoT devices" (in en). 
  73. "Install influxdb for Linux using the Snap Store" (in en). 
  74. Nestor, Marius (27 July 2018). "You Can Now Install Kata Containers VM as a Snap on Ubuntu, Other Linux Distros" (in en). 
  75. April 27, Jack Wallen in Cloud on; 2020; Pst, 8:50 Am. "How to install Nextcloud with SSL using snap" (in en). 
  76. "Install travis-worker for Linux using the Snap Store" (in en). 
  77. Vaughan-Nichols, Steven J.. "Ubuntu opens the door to talking with Linux Mint about Snap" (in en). 
  78. "SnapCraft homepage". 
  79. "Why Canonical views the Snap ecosystem as a compelling distribution-agnostic solution". "So, if we were to open source the Snap store, does that actually benefit us in any meaningful way? History shows that perhaps it doesn't. That's not to say that we may not open source in the future. We'll just have to see." 
  80. "Snapd should support custom servers". 
  81. "On Snappy and Flatpak: business as usual in the Canonical propaganda department". 16 June 2016. 
  82. "Q&A: Clement Lefebvre: The man behind Linux Mint". 
  83. "Teams". 
  84. "Monthly News – June 2019". 
  85. LeFebvre, Clement. "Monthly News – May 2020". The Mint Team. Retrieved 10 June 2020. 
  86. Anderson, Tim (2 June 2020). "Snapping at Canonical's Snap: Linux Mint team says no to Ubuntu store 'backdoor'". The Register (Situation Publishing). Retrieved 10 June 2020. 
Contributor MDPI registered users' name will be linked to their SciProfiles pages. To register with us, please refer to :
View Times: 586
Entry Collection: HandWiki
Revision: 1 time (View History)
Update Date: 25 Oct 2022
Video Production Service