![为什么我在 Ubuntu 登录之前会看到“正在启动 snappy 守护程序 [ok]”](https://linux22.com/image/1150554/%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E5%9C%A8%20Ubuntu%20%E7%99%BB%E5%BD%95%E4%B9%8B%E5%89%8D%E4%BC%9A%E7%9C%8B%E5%88%B0%E2%80%9C%E6%AD%A3%E5%9C%A8%E5%90%AF%E5%8A%A8%20snappy%20%E5%AE%88%E6%8A%A4%E7%A8%8B%E5%BA%8F%20%5Bok%5D%E2%80%9D.png)
在我启动计算机之后,登录加载之前,我开始看到文本“正在启动 snappy 守护进程 [ok]”。
该文本并不总是显示。
另外,我运行了命令“sudo systemctl status snap*”,虽然我没有安装任何与 snappy 相关的东西,但输出是:
● snapd.refresh.timer - Timer to automatically refresh installed snaps
Loaded: loaded (/lib/systemd/system/snapd.refresh.timer; enabled; vendor pres
Active: active (waiting) since Tue 2017-10-03 05:16:34 PDT; 7min ago
Oct 03 05:16:34 hpe systemd[1]: Started Timer to automatically refresh installed
● snapd.socket - Socket activation for snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.socket; enabled; vendor preset: ena
Active: active (running) since Tue 2017-10-03 05:16:34 PDT; 7min ago
Listen: /run/snapd.socket (Stream)
/run/snapd-snap.socket (Stream)
Oct 03 05:16:34 hpe systemd[1]: Starting Socket activation for snappy daemon.
Oct 03 05:16:34 hpe systemd[1]: Listening on Socket activation for snappy daemon
● snap-repair.timer - Timer to automatically fetch and run repair assertions
Loaded: loaded (/lib/systemd/system/snap-repair.timer; enabled; vendor preset
Active: active (waiting) since Tue 2017-10-03 05:16:34 PDT; 7min ago
Oct 03 05:16:34 hpe systemd[1]: Started Timer to automatically fetch and run rep
● snapd.service - Snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: en
lines 1-23...skipping...
● snapd.refresh.timer - Timer to automatically refresh installed snaps
Loaded: loaded (/lib/systemd/system/snapd.refresh.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Tue 2017-10-03 05:16:34 PDT; 7min ago
Oct 03 05:16:34 hpe systemd[1]: Started Timer to automatically refresh installed snaps.
● snapd.socket - Socket activation for snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.socket; enabled; vendor preset: enabled)
Active: active (running) since Tue 2017-10-03 05:16:34 PDT; 7min ago
Listen: /run/snapd.socket (Stream)
/run/snapd-snap.socket (Stream)
Oct 03 05:16:34 hpe systemd[1]: Starting Socket activation for snappy daemon.
Oct 03 05:16:34 hpe systemd[1]: Listening on Socket activation for snappy daemon.
● snap-repair.timer - Timer to automatically fetch and run repair assertions
Loaded: loaded (/lib/systemd/system/snap-repair.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Tue 2017-10-03 05:16:34 PDT; 7min ago
Oct 03 05:16:34 hpe systemd[1]: Started Timer to automatically fetch and run repair assertions.
● snapd.service - Snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2017-10-03 05:16:39 PDT; 7min ago
Main PID: 1160 (snapd)
CGroup: /system.slice/snapd.service
└─1160 /usr/lib/snapd/snapd
Oct 03 05:16:34 hpe systemd[1]: Starting Snappy daemon...
Oct 03 05:16:38 hpe snapd[1160]: 2017/10/03 05:16:38.072701 daemon.go:252: started snapd/2.27.5 (seri
Oct 03 0
5:16:39 hpe systemd[1]: Started Snappy daemon.
答案1
请注意,如果没有使用 snap,snapd 就不应该一直运行,它是通过套接字激活的...打印“启动 snappy 守护进程 [ok]”的 systemd 单元只设置了在您使用 snap 命令后通过其启动 snapd 的套接字。
答案2
在 16.04 及更新版本中,该snapd
包默认安装。因此,它也会默认启动并运行。
如果您没有使用任何 snap 安装的包,那么snapd
从系统中删除该包是完全没有问题的。