执行命令df -h
lkmao@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.6G 0 1.6G 0% /dev
tmpfs 391M 2.1M 389M 1% /run
/dev/sda1 59G 30G 26G 54% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/loop0 13M 13M 0 100% /snap/gnome-characters/139
/dev/loop1 2.3M 2.3M 0 100% /snap/gnome-calculator/260
/dev/loop2 3.8M 3.8M 0 100% /snap/gnome-system-monitor/57
/dev/loop3 91M 91M 0 100% /snap/core/6350
/dev/loop4 15M 15M 0 100% /snap/gnome-logs/45
/dev/loop5 141M 141M 0 100% /snap/gnome-3-26-1604/74
/dev/loop6 35M 35M 0 100% /snap/gtk-common-themes/818
tmpfs 391M 16K 391M 1% /run/user/121
tmpfs 391M 24K 391M 1% /run/user/1000
lkmao@ubuntu:~$
他们都是挂载到/snap目录下:
lkmao@ubuntu:/snap$ ls
bin gnome-3-26-1604 gnome-characters gnome-system-monitor README
core gnome-calculator gnome-logs gtk-common-themes
lkmao@ubuntu:/snap$
查看README文件:
lkmao@ubuntu:/snap$ cat README
This directory presents installed snap packages.
It has the following structure:
/snap/bin - Symlinks to snap applications.
/snap/<snapname>/<revision> - Mountpoint for snap content.
/snap/<snapname>/current - Symlink to current revision, if enabled.
DISK SPACE USAGE
The disk space consumed by the content under this directory is
minimal as the real snap content never leaves the .snap file.
Snaps are *mounted* rather than unpacked.
For further details please visit
https://forum.snapcraft.io/t/the-snap-directory/2817
lkmao@ubuntu:/snap$
查看bin目录下的文件:如下所示,这不是不是很想busybox的套路。
lkmao@ubuntu:/snap/bin$ ls -lsh
total 0
0 lrwxrwxrwx 1 root root 13 Jul 25 22:49 gnome-calculator -> /usr/bin/snap
0 lrwxrwxrwx 1 root root 13 Jul 25 22:49 gnome-characters -> /usr/bin/snap
0 lrwxrwxrwx 1 root root 13 Jul 25 22:49 gnome-logs -> /usr/bin/snap
0 lrwxrwxrwx 1 root root 13 Jul 25 22:49 gnome-system-monitor -> /usr/bin/snap
lkmao@ubuntu:/snap/bin$
如果没猜错,PATH环境变量中很定有/snap/bin这个目录:打印PATH如下所示:
lkmao@ubuntu:/snap/bin$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
lkmao@ubuntu:/snap/bin$
/dev/loop0 挂载到 /snap/gnome-characters/139,看名字gnome-characters好像是一个软件,执行
gnome-characters
执行结果如下,看起来是个很有趣而且没什么用的的软件。 所以不能删。
计算器:gnome-calculator
系统监控:gnome-system-monitor
日志浏览工具:gnome-logs
其他的三个目录
/snap/core/6350目录的文件,这不就是一个根文件系统吗
lkmao@ubuntu:/snap/core/6350$ ls
bin dev home lib64 meta opt root sbin srv tmp var
boot etc lib media mnt proc run snap sys usr writable
lkmao@ubuntu:/snap/core/6350$
cd /snap/gnome-3-26-1604/74,这个目录,嗯?
lkmao@ubuntu:/snap/gnome-3-26-1604/74$ ls
etc lib meta sbin snap usr var
lkmao@ubuntu:/snap/gnome-3-26-1604/74$
lkmao@ubuntu:/snap/gnome-3-26-1604/74/etc$ cd /snap/gtk-common-themes/818
lkmao@ubuntu:/snap/gtk-common-themes/818$ ls
meta share snap
lkmao@ubuntu:/snap/gtk-common-themes/818$ tree -L 2
.
├── meta
│ └── snap.yaml
├── share
│ ├── gtk2
│ ├── icons
│ ├── sounds
│ └── themes
└── snap
├── manifest.yaml
└── snapcraft.yaml
7 directories, 3 files
lkmao@ubuntu:/snap/gtk-common-themes/818$