执行命令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$
Snap是一种轻量级应用程序封装格式,它是Linux发行版中的一部分。Snap提供了一种方便的应用程序安装和更新方式,它可以在几秒钟内安装、升级和卸载应用程序。与传统的包管理器相比,Snap更加快速、简单和安全。此外,Snap还支持热更新,这意味着用户可以在不重新启动应用程序的情况下更新其应用程序版本。总的来说,Snap是一种非常流行的应用程序封装格式,特别是在Linux发行版中使用非常广泛
/dev/loop0 挂载到 /snap/gnome-characters/139,看名字gnome-characters好像是一个软件,执行
gnome-characters
Gnome-characters是一个字符映射工具,它可以用来生成或编辑字符映射表。字符映射表是一个包含各种字符及其对应的ASCII码值的表格。Gnome-characters工具可用于将文本转换为Unicode编码或其他编码格式,或将其他编码格式转换为UTF-8编码。此外,Gnome-characters还可以用于检查字符是否有效,并帮助用户查找和修复无效的字符。总体来说,Gnome-characters是一个非常有用的工具,可以帮助用户更好地处理和编辑文本
执行结果如下,看起来是个很有趣而且没什么用的的软件。 所以不能删。
计算器:gnome-calculator
系统监控:gnome-system-monitor
日志浏览工具:gnome-logs
其他的三个目录
/snap/core/6350目录的文件,这不就是一个根文件系统吗文章来源:https://www.toymoban.com/news/detail-609571.html
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,这个目录,嗯?文章来源地址https://www.toymoban.com/news/detail-609571.html
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$
到了这里,关于Ubuntu /dev/loop<0..n>挂载的目录的分析的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!