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 -- 1606 2022-10-21 01:49:50

Video Upload Options

Do you have a full video?

Confirm

Are you sure to Delete?
Cite
If you have any further questions, please contact Encyclopedia Editorial Office.
HandWiki. Snap. Encyclopedia. Available online: https://encyclopedia.pub/entry/30562 (accessed on 02 May 2024).
HandWiki. Snap. Encyclopedia. Available at: https://encyclopedia.pub/entry/30562. Accessed May 02, 2024.
HandWiki. "Snap" Encyclopedia, https://encyclopedia.pub/entry/30562 (accessed May 02, 2024).
HandWiki. (2022, October 21). Snap. In Encyclopedia. https://encyclopedia.pub/entry/30562
HandWiki. "Snap." Encyclopedia. Web. 21 October, 2022.
Snap
Edit

Snap is a software packaging and deployment system developed by Canonical for operating systems that use the Linux kernel and the systemd init system. 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 also work for Internet of Things devices and desktop applications.

cloud applications snap deployment

1. Functionality

1.1. Snap Store

The Snap Store allows developers to publish their snap-packaged applications.[1] All apps uploaded to the Snap Store undergo automatic testing, including a malware scan. However, the scan does not catch all issues. 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.[2][3][4] Although the Snap sandbox reduces the impact of a malicious app, Canonical recommends users only install Snaps from publishers trusted by the user.[5][6]

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.[7][8]

The command snap list here shows that Skype and IntelliJ IDEA have been installed

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.[9][10] Although this has the advantage that snaps use less disk space, it also means some large applications start more slowly.[11][12]

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][13][14] To ensure this, Snap relies on systemd for features such as running socket-activated system services in a Snap.[15] This causes Snap to work best only on distributions that can adopt that init system.[16]

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.[17][18][19] 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.[20][21] These portals often provide a better user experience compared to the native Linux APIs because they prompt the user for permission to use 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.[22] This is often used to share common libraries and application frameworks between Snaps to reduce the size of Snaps by avoiding duplication.[23][24]

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,[25] 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.[25][26][27]

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[28] but some themes are not supported yet[29] 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.[30] Work is ongoing to make it easier for third parties to package themes in a Snap and to automatically install uncommon system themes.[31]

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 an atomic operation. Updates can be reverted[32][33] and use delta encoding to reduce their download size.[34][35][36]

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.[10][37][38][39]

Automatic updates can be turned off using some hacks;[40] also, there are many ways to configure updates to suit particular needs. Users 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 for updates 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.[41][42] Even with these controls, a number of users have voiced their complaints about the lack of an option to turn automatic updates completely off.[43]

1.5. Snapcraft

Snapcraft is a tool for developers to package their programs in the Snap format.[44] It runs on any Linux distribution supported by Snap, macOS[45] and Microsoft Windows.[46] Snapcraft builds the packages in a Virtual Machine using Multipass,[47] in order to ensure the result of a build is the same, regardless of which distribution or operating system it is built on.[48] Snapcraft supports multiple 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 setup.py files.[45][49]

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.[50] Snap requires Systemd which is available in most, but not all, Linux distributions. Other Unix-like systems (e.g. FreeBSD) are not supported.[51] Chrome OS does not support Snap directly, only through Linux distros installed in it that support Snap, such as Gallium OS.[52]

A number of Linux distributions support Snap out of the box such as Ubuntu (and its derivatives, such as Kubuntu and Xubuntu),[53] Manjaro,[54] Zorin OS,[55] KDE Neon,[56] Solus[57] and Li-f-e.[58] 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.[59]

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

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][75] 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

Snap has received mixed reaction from the developer community.

On Snap's promotional site, Heroku praised Snap's auto-update as it fits their fast release schedule well. Microsoft mentions its ease of use and Snap being YAML-based, as well as it being distribution-agnostic. JetBrains says the Snap Store gives their tools more exposure.[76]

Others have objected to the closed-source nature of the Snap Store. Clement Lefebvre (Linux Mint founder and project leader[77][78]) 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.[79] He later announced that the installing of Snap will be blocked,[80] although a way to disable this restriction will be documented.[81]

References

  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). https://www.techrepublic.com/article/why-canonical-views-the-snap-ecosystem-as-a-compelling-distribution-agnostic-solution/. 
  2. "How Canonical Is Improving Ubuntu Linux Security". 29 August 2018. https://www.eweek.com/security/how-canonical-is-improving-ubuntu-linux-security. 
  3. "Malware Found on the Ubuntu Snap Store" (in en-GB). 2018-05-13. https://www.omgubuntu.co.uk/2018/05/ubuntu-snap-malware. 
  4. Canonical (2018-05-15). "Trust and security in the Snap Store" (in en). https://snapcraft.io/blog/trust-and-security-in-the-snap-store. 
  5. "Packages for Ubuntu" (in en). https://ubuntu.com/about/packages. 
  6. "Bogus apps in store" (in en-US). 2018-03-27. https://forum.snapcraft.io/t/bogus-apps-in-store/4703/9. 
  7. June 21, Jack Wallen in Open Source on; 2016; Pst, 8:13 Am. "Canonical changes the game by announcing universal snap packages" (in en). https://www.techrepublic.com/article/canonical-changes-the-game-by-announcing-universal-snap-packages/. 
  8. Kepes, Ben (2016-06-14). "Snap! Do the Linux distros finally agree on something?" (in en). https://www.computerworld.com/article/3082766/snap-do-the-linux-distros-finally-agree-on-something.html. 
  9. ReadySpace (2019-11-14). "A technical comparison between the snap and the Flatpak formats" (in en-US). https://readyspace.co.id/en/a-technical-comparison-between-the-snap-and-the-flatpak-formats/. 
  10. McKay, Dave. "How to Work with Snap Packages on Linux" (in en-US). https://www.howtogeek.com/660193/how-to-work-with-snap-packages-on-linux/. 
  11. "Squashfs performance effect on snap startup time" (in en-US). 2019-10-29. https://forum.snapcraft.io/t/squashfs-performance-effect-on-snap-startup-time/13920. 
  12. McKay, Dave. "What You Need to Know About Snaps on Ubuntu 20.04" (in en-US). https://www.howtogeek.com/670084/what-you-need-to-know-about-snaps-on-ubuntu-20.04/. 
  13. "Call for testing: OpenPrinting's printing-stack-snap (Printing in a Snap)" (in en-US). 2018-03-09. https://forum.snapcraft.io/t/call-for-testing-openprintings-printing-stack-snap-printing-in-a-snap/4406. 
  14. "Canonical unveils 6th LTS release of Ubuntu with 16.04". Canonical Ltd.. https://insights.ubuntu.com/2016/04/20/canonical-unveils-6th-lts-release-of-ubuntu-with-16-04/. 
  15. "Services and daemons". https://snapcraft.io/docs/services-and-daemons. 
  16. "WSL2- Ubuntu 20.04 Snap store doesn't work due to systemd dependency · Issue #5126 · microsoft/WSL" (in en). https://github.com/microsoft/WSL/issues/5126. 
  17. "Supported interfaces | Snapcraft documentation" (in en). https://snapcraft.io/docs/supported-interfaces. 
  18. ReadySpace (2019-06-06). "Snapcraft confinement & interfaces" (in zh-hans). https://readyspace.com.cn/snapcraft-confinement-interfaces/. 
  19. ReadySpace (2018-11-02). "A guide to snap permissions and interfaces" (in en-US). https://readyspace.com.hk/a-guide-to-snap-permissions-and-interfaces/. 
  20. "Flatpak's XDG-Desktop-Portal Adds Initial Support For Snaps - Phoronix". https://www.phoronix.com/scan.php?page=news_item&px=XDG-Desktop-Portal-Snapped. 
  21. "Desktop Integration — Flatpak documentation". https://docs.flatpak.org/en/latest/desktop-integration.html?highlight=portals#portals. 
  22. "The content interface" (in en). https://snapcraft.io/docs/content-interface. 
  23. "Snappy Is Finally Doing Something About Super Large App Sizes" (in en-GB). 2017-06-11. https://www.omgubuntu.co.uk/2017/06/gnome-platform-snap-development. 
  24. "Bundling KDE" (in en). https://archive.fosdem.org/2017/schedule/event/desktops_bundling_kde/. 
  25. Edge, Jake (2019-11-20). "LSM stacking and the future". https://lwn.net/Articles/804906/. 
  26. "How Are SNAPS claiming to have no internet plug regulated?" (in en-US). 2020-07-11. https://forum.snapcraft.io/t/how-are-snaps-claiming-to-have-no-internet-plug-regulated/18755/25. 
  27. Johansen, John (3 February 2019). "Containers with Different Security Modules". https://archive.fosdem.org/2019/schedule/event/containers_lsm/. 
  28. "How to use the system GTK theme via the gtk-common-themes snap" (in en-US). 2020-02-21. https://forum.snapcraft.io/t/how-to-use-the-system-gtk-theme-via-the-gtk-common-themes-snap/6235. 
  29. "Kubuntu 20.04 LTS Review | ORDINATECHNIC". https://www.ordinatechnic.com/distribution-reviews/Kubuntu/kubuntu-2004-lts-review. 
  30. "How to Change Snap App Theme on Ubuntu (With Examples)" (in en-GB). 2020-06-18. https://www.omgubuntu.co.uk/2020/06/change-snap-app-theme. 
  31. "Automatic theme snap installation notes" (in en-US). 2020-05-25. https://forum.snapcraft.io/t/automatic-theme-snap-installation-notes/14274/4. 
  32. "How to revert to a previous version of a snap package? wekan in this case" (in en-us). 2017-03-08. https://costales.github.io/posts/how-to-revert-to-previous-version-of/. 
  33. "A Beginners Guide to Snaps in Linux - Part 1" (in en-US). https://www.tecmint.com/install-snap-in-linux/. 
  34. "Snapcraft - Snaps are universal Linux packages". https://snapcraft.io/. 
  35. Willis, Nathan (28 January 2015). "Ubuntu Core and Snappy". Linux Weekly News. https://lwn.net/Articles/630660/. 
  36. Vaughan-Nichols, Steven J.. "Ubuntu Snap takes charge of Linux desktop and IoT software distribution". https://zdnet.com/article/ubuntu-snap-takes-charge-of-linux-desktop-and-iot-software-distribution/. 
  37. "Controlling snap releases with channels, tracks and branches – Part 1" (in en). https://ubuntu.com/blog/controlling-snap-releases-with-channels-tracks-and-branches-part-1. 
  38. "Controlling snap releases with channels, tracks and branches – Part 2" (in en). https://ubuntu.com/blog/controlling-snap-releases-with-channels-tracks-and-branches-part-2. 
  39. Prakash, Abhishek. "Using Snap Packages In Ubuntu & Other Linux [Complete Guide"] (in en-US). https://itsfoss.com/use-snap-packages-ubuntu-16-04/. 
  40. "How to disable autorefresh in snap". https://askubuntu.com/questions/930593/how-to-disable-autorefresh-in-snap. 
  41. Logix. "How To Change Snap Refresh (Update) Schedule" (in en-us). https://www.linuxuprising.com/2019/07/how-to-change-snap-refresh-update.html. 
  42. Pope, Alan (3 March 2020). "Controlling Snap Updates". https://www.youtube.com/watch?v=gVZOBgTDJWc. 
  43. "Disabling automatic refresh for snap from store". 20 May 2017. https://forum.snapcraft.io/t/disabling-automatic-refresh-for-snap-from-store/707. 
  44. Brodkin, Jon. "Adios apt and yum? Ubuntu's snap apps are coming to distros everywhere". Ars Technica. https://arstechnica.com/information-technology/2016/06/goodbye-apt-and-yum-ubuntus-snap-apps-are-coming-to-distros-everywhere/. 
  45. Nestor, Marius (30 January 2019). "Canonical Releases Snapcraft 3.1 Snap Creator Tool with Various Improvements" (in en). https://news.softpedia.com/news/canonical-releases-snapcraft-3-1-snap-creator-tool-with-various-improvements-524761.shtml. 
  46. Nestor, Marius (10 September 2019). "Ubuntu's Snapcraft Snap Creator Tool Will Soon Get a Windows Installer" (in en). https://news.softpedia.com/news/ubuntu-s-snapcraft-snap-creator-tool-will-soon-get-a-windows-installer-527336.shtml. 
  47. "Build options | Snapcraft documentation". https://snapcraft.io/docs/build-options. 
  48. ReadySpace (2019-03-15). "Make your snap development faster" (in zh-hans). https://readyspace.com.cn/make-your-snap-development-faster/. 
  49. "Using external metadata | Snapcraft documentation" (in en). https://snapcraft.io/docs/using-external-metadata. 
  50. "Ubuntu's container-style Snap app packages now work on other Linux distributions" (in en-US). https://social.techcrunch.com/2016/06/14/ubuntus-container-style-snap-app-packages-now-work-on-other-linux-distributions/. 
  51. "Installing snapd | Snapcraft documentation" (in en). https://snapcraft.io/docs/installing-snapd. 
  52. "Installing snap on GalliumOS | Snapcraft documentation" (in en). https://snapcraft.io/docs/installing-snap-on-galliumos. 
  53. Hoffman, Chris; PCWorld | (2016-04-18). "Ubuntu 16.04 will support 'Snaps' alongside Deb packages for improved software installation" (in en). https://www.pcworld.com/article/3056668/ubuntu-1604-will-support-snaps-alongside-deb-packages-for-improved-software-installation.html. 
  54. Evangelho, Jason. "Manjaro Linux 18.1 Is Officially Released, And You Have A New Choice To Make" (in en). https://www.forbes.com/sites/jasonevangelho/2019/09/12/manjaro-linux-181-is-officially-released-and-you-have-a-new-choice-to-make/. 
  55. "And the next version of Zorin OS is… | The official Zorin Blog" (in en-US). https://zoringroup.com/blog/2019/03/20/and-the-next-version-of-zorin-os-is/. 
  56. "KDE Neon to Support Snap Apps in Plasma Discover" (in en-GB). 2017-02-10. https://www.omgubuntu.co.uk/2017/02/kde-neon-intergrating-snap-apps. 
  57. Strobl, Joshua. "Solus 3 Released" (in en). https://getsol.us/2017/08/15/solus-3-released/. 
  58. cyberorg (2020-07-07). "Li-f-e: Installing more applications" (in en). https://cyberorg.wordpress.com/2020/07/07/li-f-e-installing-more-applications/. 
  59. "Installing snapd | Snapcraft documentation" (in en). https://snapcraft.io/docs/installing-snapd. 
  60. "Google and Canonical bring Flutter apps to Linux and the Snap Store" (in en-US). 2020-07-08. https://venturebeat.com/2020/07/08/google-canonical-ubuntu-flutter-apps-linux-support/. 
  61. "Install IntelliJ IDEA on Ubuntu with Snaps – IntelliJ IDEA Blog | JetBrains" (in en-US). https://blog.jetbrains.com/idea/2017/11/install-intellij-idea-with-snaps/. 
  62. "Month of KDE Applications Snaps – KDE neon Developers' Blog" (in en-US). https://blog.neon.kde.org/index.php/2019/02/13/month-of-kde-applications-snaps/. 
  63. .NET Core 3.1.0 Preview 2, .NET Foundation, 2019-11-08, https://github.com/dotnet/core/blob/master/release-notes/3.1/preview/3.1.0-preview2-install-instructions.md, retrieved 2019-11-08 
  64. Vaughan-Nichols, Steven J.. "Use Ubuntu's snap to install Skype on any Linux desktop" (in en). https://www.zdnet.com/article/use-ubuntus-snap-to-install-skype-on-any-linux-desktop/. 
  65. Hoffman, Chris; PCWorld | (2016-04-25). "Mozilla will provide Firefox as a Snap package for Ubuntu, cutting out the middleman" (in en). https://www.pcworld.com/article/3060143/mozilla-will-provide-firefox-as-a-snap-package-for-ubuntu-cutting-out-the-middleman.html. 
  66. "Spotify Now Available as a Snap App on Ubuntu" (in en-GB). 2017-12-30. https://www.omgubuntu.co.uk/2017/12/spotify-now-available-snap-app-ubuntu. 
  67. Vaughan-Nichols, Stephen J. (11 May 2015). "Ubuntu jumps into Internet of Things with Acer, GE, and Microsoft". ZDNet. https://www.zdnet.com/article/ubuntu-jumps-into-internet-of-things-with-acer-ge-and-microsoft/. 
  68. Sherman, Jordana. "Snappy Core unlocks IoT value within the Dell Edge Gateway 5000 Series". Canonical Ltd.. https://insights.ubuntu.com/2015/10/21/snappy-core-unlocks-iot-value-within-the-dell-edge-gateway-5000-series/. 
  69. "LimeSDR Mini takes off in satellites". 2018-03-14. http://linuxgizmos.com/limesdr-mini-takes-off-in-satellites/. 
  70. "Ubuntu Core 18 released for secure, reliable IoT devices" (in en). https://ubuntu.com/blog/ubuntu-core-18-released-for-secure-reliable-iot-devices. 
  71. "Install influxdb for Linux using the Snap Store" (in en). https://snapcraft.io/influxdb. 
  72. Nestor, Marius (27 July 2018). "You Can Now Install Kata Containers VM as a Snap on Ubuntu, Other Linux Distros" (in en). https://news.softpedia.com/news/you-can-now-install-kata-containers-as-a-snap-on-ubuntu-and-other-linux-distros-522138.shtml. 
  73. April 27, Jack Wallen in Cloud on; 2020; Pst, 8:50 Am. "How to install Nextcloud with SSL using snap" (in en). https://www.techrepublic.com/article/how-to-install-nextcloud-with-ssl-using-snap/. 
  74. "Install travis-worker for Linux using the Snap Store" (in en). https://snapcraft.io/travis-worker. 
  75. Vaughan-Nichols, Steven J.. "Ubuntu opens the door to talking with Linux Mint about Snap" (in en). https://www.zdnet.com/article/ubuntu-opens-the-door-to-talking-with-linux-mint-about-snap/. 
  76. "SnapCraft homepage". https://snapcraft.io/. 
  77. "Q&A: Clement Lefebvre: The man behind Linux Mint". https://techworld.com.au/article/529572/q_clement_lefebvre_man_behind_linux_mint. 
  78. "Teams". https://linuxmint.com/teams.php. 
  79. "Monthly News – June 2019". https://blog.linuxmint.com/?p=3766. 
  80. LeFebvre, Clement. "Monthly News – May 2020". The Mint Team. https://blog.linuxmint.com/?p=3906. Retrieved 10 June 2020. 
  81. Anderson, Tim (2 June 2020). "Snapping at Canonical's Snap: Linux Mint team says no to Ubuntu store 'backdoor'". The Register (Situation Publishing). https://www.theregister.com/2020/06/02/linux_mint_team_snap/. Retrieved 10 June 2020. 
More
Information
Contributor MDPI registered users' name will be linked to their SciProfiles pages. To register with us, please refer to https://encyclopedia.pub/register :
View Times: 983
Entry Collection: HandWiki
Revision: 1 time (View History)
Update Date: 21 Oct 2022
1000/1000