Skip to content

模拟系统的工具

想直接在一些没有 root 权限的系统上使用 ArchLinux,推荐使用: https://github.com/fsquillace/junest

这个工具涉及到了 fakeroot / chroot / groot / bubblewrap / proot 这几个工具,下面来谈一下他们是什么。

fakeroot

fakeroot 会新建一个 shell,在这里面目标目录的权限都是 root,但是一旦退出就还是原来的权限。
使用方法: sudo chroot /path/of/your_dir

chroot, groot, bubblewrap

这三个基本是一样的。他们的作用是将某个目录作为【整个系统的根目录】,需要 root 权限。

proot

最后就是 proot 了,说到功能,他和 chroot 这些都是基本一样的,但是比较强的是,它不需要 root 权限。
这个也是最开始推荐的工具的原理,其以 proot 为基础,将一个模拟 archlinux 的目录假装为根目录。

Comments