snap现在是自带在Ubuntu16.04和Ubuntu18.04中的。
我今天才发现原来Ubuntu的gnome桌面是通过snap安装的:
-> # snap list
Name Version Rev Tracking Publisher Notes
core 16-2.37.1 6350 stable canonical✓ core
gnome-3-26-1604 3.26.0 74 stable/… canonical✓ -
gnome-calculator 3.30.1 260 stable/… canonical✓ -
gnome-characters 3.30.0 139 stable/… canonical✓ -
gnome-logs 3.30.0 45 stable/… canonical✓ -
gnome-system-monitor 3.30.0 57 stable/… canonical✓ -
gtk-common-themes 0.1-4-g88bc1b2 818 stable/… canonical✓ -
官网:Install Linux apps using the Snap Store | Snapcraft
查看snap版本:
-> # snap version
snap 2.39.3
snapd 2.39.3
series 16
ubuntu 18.04
kernel 4.18.0-25-generic
snap安装软件也很简单:
sudo snap install pycharm-community --classic
安装完成后你就可以启动PyCharm了:
snap run pycharm-community
如果你需要这个软件,可以禁用它,然后再次启用它。这样可以避免在系统中删除并重新安装它们:
-> # snap disable github-desktop
github-desktop disabled
-> # snap enable github-desktop
github-desktop enabled
snap设置代理也比较方便,注意,下面这个也是http,不是打错了:
sudo snap set system proxy.http="http://<proxy_addr>:<proxy_port>"
sudo snap set system proxy.https="http://<proxy_addr>:<proxy_port>"
参考网址:How to install snap packages behind web proxy on Ubuntu 16.04 - Ask Ubuntu
另外一篇介绍snap原理的文章:我就是我,原理不一样的snap|Linux 中国◆开源社区