![Ubuntu's official snap packages icon.](https://i-blog.csdnimg.cn/blog_migrate/35141796c5d384dd0116a332fbb0132d.png)
Ubuntu 20.04 Focal Fossa is a fantastic release that’s been widely praised. However, the decision to change the Software Center to install snap-based applications is controversial. We’ll explain what that means for you.
Ubuntu 20.04 Focal Fossa是一个了不起的版本,受到了广泛的好评。 但是,决定更改软件中心以安装基于快照的应用程序是有争议的。 我们将解释对您意味着什么。
什么是Linux上的快照包? (What’s a Snap Package on Linux?)
“Snap” refers to both the snap
command and a snap installation file. A snap bundles an application and all its dependents into one compressed file. The dependents might be library files, web or database servers, or anything else an application must have to launch and run.
“快照”是指snap
命令和快照安装文件。 快照将应用程序及其所有从属项捆绑到一个压缩文件中。 依赖项可能是库文件,Web或数据库服务器,也可能是应用程序必须启动和运行的任何其他项。
The upside to snaps is they make installations simpler because they avoid the heartache of dependency hell. This is what occurs when a new application can’t run either because a required resource isn’t available, it’s the wrong version, or its installation overwrites files required by existing applications so they can’t run.
快照的好处是它们使安装更加简单,因为它们避免了依赖地狱的痛苦。 当新应用程序由于无法使用所需资源,版本错误或无法安装而覆盖现有应用程序所需文件时,就会发生这种情况。
You might expect a snap to be uncompressed and the files extracted at install time. However, it’s at run time that the snap file is mounted on a block loop device. This allows the file’s internal SquashFS file system to be accessed.
您可能希望在安装时解压缩快照并提取文件。 但是,快照文件是在运行时安装在块循环设备上的 。 这允许访问文件的内部SquashFS文件系统 。
The application is executed in an encapsulated, ring-fenced way, so its files can’t interfere with those on your computer. You can even install multiple versions of the same application, and they won’t cross-pollinate or fight amongst themselves.
该应用程序以封装的,环形的方式执行,因此其文件不会干扰您计算机上的文件。 您甚至可以安装同一应用程序的多个版本,它们不会相互授粉或在彼此之间发生争斗。
The downside is the installation files are bigger than the traditional Debian package manager (DEB) files. They also use more hard drive real estate. With snaps, every application that needs a particular resource installs its own copy. This isn’t the most efficient use of hard drive space. Although hard drives are getting bigger and cheaper, traditionalists still balk at the extravagance of each application running in its ow