Developer(s) | Canonical Group Limited |
---|---|
Repository | |
Operating system | Linux |
License | GNU General Public License, version 3.0 |
Website | snapcraft |
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 [1] 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 [2] but was later ported to work for Internet of Things devices [3] [4] and desktop [5] [6] applications too.
The Snap Store allows developers to publish their snap-packaged applications. [7] 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. [8] [9] [10] Although the Snap sandbox reduces the impact of a malicious app, Canonical recommends users only install Snaps from publishers trusted by the user. [11] [12]
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. [13] [14]
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. [15] [16] Although this has the advantage that snaps use less disk space, it also means some large applications start slower. [17] [18]
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. [7] [19] [20] To ensure this, Snap relies on systemd for features such as running socket-activated system services in a Snap. [21] This causes Snap to work best only on distributions that can adopt that init system. [22]
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. [23] [24] [25] 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. [26] [27] 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. [28] This is often used to share common libraries and application frameworks between Snaps to reduce the size of Snaps by avoiding duplication. [29] [30]
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, [31] 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. [32] [31] [33]
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 [34] but some themes are not supported yet [35] 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. [36] Work is ongoing to make it easier for third parties to package themes in a Snap and to automatically install uncommon system themes. [37]
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 [38] [39] and use delta encoding to reduce their download size. [40] [41] [42]
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. [43] [44] [45] [16]
Automatic updates can be turned off using some hacks, [46] 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. [47] [48] Even with these controls, a number of users have voiced their complaints about the lack of an option to turn automatic updates completely off. [49]
Developer(s) | Canonical Group Limited |
---|---|
Stable release | 4.7 [50] / 26 April 2021 |
Repository | https://github.com/snapcore/snapcraft.git |
Written in | Python |
Operating system | GNU/Linux |
License | GNU General Public License, version 3.0 |
Website | snapcraft |
Snapcraft is a tool for developers to package their programs in the Snap format. [51] It runs on any Linux distribution supported by Snap, macOS [52] and Microsoft Windows. [53] Snapcraft builds the packages in a Virtual Machine using Multipass, [54] in order to ensure the result of a build is the same, regardless of which distribution or operating system it is built on. [55] Snapcraft supports a 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. [52] [56]
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. [57] 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. [58]
A number of Linux distributions support Snap out of the box such as Ubuntu (and e.g. Kubuntu, Xubuntu), [59] Manjaro, [60] Zorin OS, [61] KDE Neon, [62] Solus [63] and Li-f-e. [64] 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. [65]
A number of notable Desktop software development companies publish their software in the Snap Store, including Google, [66] JetBrains, [67] KDE, [68] Microsoft (for Linux versions of e.g. .NET Core 3.1, [69] Visual Studio Code, Skype, [70] and PowerShell), Mozilla [71] and Spotify. [72] Snaps are also used in Internet-of-Things environments, ranging from consumer-facing products [73] to enterprise device management gateways [74] and satellite communication networks. [75] [76] Finally, Snap is also used by developers of server applications such as InfluxDB, [77] Kata Containers, [78] Nextcloud [79] and Travis CI. [80]
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. [81] [7] 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.
Some developers have praised Snap. [82] 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.
Others have objected to the closed-source nature of the Snap Store. Clement Lefebvre (Linux Mint founder and project leader [83] [84] ) 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. [85] He later announced that the installing of Snap will be blocked, [86] although a way to disable this restriction will be documented. [87]
A Linux distribution is an operating system made from a software collection that is based upon the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems ranging from embedded devices and personal computers to powerful supercomputers.
A light-weight Linux distribution is one that uses lower memory and/or has less processor-speed requirements than a more "feature-rich" Linux distribution. The lower demands on hardware ideally result in a more responsive machine, and/or allow devices with fewer system resources to be used productively. The lower memory and/or processor-speed requirements are achieved by avoiding software bloat, i.e. by leaving out features that are perceived to have little or no practical use or advantage, or for which there is no or low demand.
Ubuntu is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: Desktop, Server, and Core for Internet of things devices and robots. All the editions can run on the computer alone, or in a virtual machine. Ubuntu is a popular operating system for cloud computing, with support for OpenStack. Ubuntu's default desktop has been GNOME since version 17.10.
seccomp is a computer security facility in the Linux kernel. seccomp allows a process to make a one-way transition into a "secure" state where it cannot make any system calls except exit
, sigreturn
, read
and write
to already-open file descriptors. Should it attempt any other system calls, the kernel will terminate the process with SIGKILL or SIGSYS. In this sense, it does not virtualize the system's resources but isolates the process from them entirely.
AppImage is a format for distributing portable software on Linux without needing superuser permissions to install the application. It tries also to allow Linux distribution-agnostic binary software deployment for application developers, also called upstream packaging. Released first in 2004 under the name klik, it was continuously developed, then renamed in 2011 to PortableLinuxApps and later in 2013 to AppImage.
A portable application, sometimes also called standalone, is a program designed to read and write its configuration settings into an accessible folder in the computer, usually in the folder where the portable application can be found. This makes it easier to transfer the program with the user's preferences and data between different computers. A program that doesn't have any configuration options can also be a portable application.
CNR, or One-Click & Run, was a free one-click software delivery service that was created to make finding and installing Linux software easier. It assisted the user in finding and installing software on their computer, and sat dormant in the system tray when not in use.
An app store is a type of digital distribution platform for computer software called applications, often in a mobile context. Apps provide a specific set of functions which, by definition, do not include the running of the computer itself. Complex software designed for use on a personal computer, for example, may have a related app designed for use on a mobile device. Today apps are normally designed to run on a specific operating system—such as the contemporary iOS, macOS, Windows or Android—but in the past mobile carriers had their own portals for apps and related media content.
Solus is an independently developed operating system for the x86-64 architecture based on the Linux kernel and a choice of the homegrown Budgie desktop environment, GNOME, MATE or KDE Plasma as the desktop environment. Its package manager, eopkg, is based on the PiSi package management system from Pardus Linux, and it has a semi-rolling release model, with new package updates landing in the stable repository every Friday. The developers of Solus have stated that Solus is intended exclusively for use on personal computers and will not include software that is only useful in enterprise or server environments.
SuperX is a Linux distribution, a computer operating system originally developed in India. SuperX uses a tweaked version of KDE and is aimed towards beginners and casual users. SuperX features a new launcher made in QML that allows users to get a grid view of all icons of the installed applications in the system, the new launcher is called "SuperX App Launcher".
Ubuntu Touch is a mobile version of the Ubuntu operating system, being developed by the UBports community. Its user interface is written in Qt, and is designed primarily for touchscreen mobile devices such as smartphones and tablet computers, but the original goal of convergence was intended to bring Ubuntu Touch to laptops, desktops, IOT devices and TVs for a complete unified user experience.
elementary OS is a Linux distribution based on Ubuntu LTS. It promotes itself as a "thoughtful, capable, and ethical" replacement to macOS and Windows and has a pay-what-you-want model. The operating system, the desktop environment, and accompanying applications are developed and maintained by Elementary, Inc.
GNOME Software is a utility for installing applications and updates on Linux. It is part of the GNOME Core Applications, and was introduced in GNOME 3.10.
Flatpak is a utility for software deployment and package management for Linux. It is advertised as offering a sandbox environment in which users can run application software in isolation from the rest of the system.
KDE neon is a Linux distribution developed by KDE based on the most recent Ubuntu long-term support (LTS) release, bundled with a set of additional software repositories containing the latest 64-bit versions of the Plasma 5 desktop environment/framework, Qt 5 toolkit and other compatible KDE software. First announced in June 2016 by Kubuntu founder Jonathan Riddell following his departure from Canonical Ltd., it has been adopted by a steadily growing number of Linux users, regularly appearing in the Top 20 on DistroWatch.com's popularity tables.
BackSlash Linux was an Ubuntu and Debian-based operating system developed in India by Kumar Priyansh for AMD64 and Intel x64-based personal computers. It was based on free software and every release of the operating system is named after the characters of the Disney film franchise Frozen. Since the third major release, BackSlash Linux Olaf, BackSlash Linux used its own custom version of KDE, called the BackSlash Shell, as the default user desktop.
Pop!_OS is a free and open-source Linux distribution, based upon Ubuntu, and featuring a GTK-based desktop environment known as COSMIC, which is based on GNOME. The distribution is developed by American Linux computer manufacturer System76. Pop!_OS is primarily built to be bundled with the computers built by System76, but can also be downloaded and installed on most computers.
Foliate is a free e-book reading application for desktop Linux systems. The name refers to leaves, meaning "(getting) leafy" or "…-leaved".
Clear Linux OS is a Linux distribution, developed and maintained on Intel's 01.org open-source platform, and optimized for Intel's microprocessors with an emphasis on performance and security. Its optimizations also affect AMD-systems. Clear Linux OS follows a rolling release model. Clear Linux OS is not intended to be a general-purpose Linux distribution; it is designed to be used by IT professionals for DevOps, AI application development, cloud computing, and containers. It currently is the fastest available Linux implementation.
{{cite web}}
: CS1 maint: numeric names: authors list (link){{cite web}}
: CS1 maint: numeric names: authors list (link){{cite web}}
: CS1 maint: numeric names: authors list (link)