小编Kat*_*l3s的帖子

WSL[2] 如何对来宾 Linux 系统造成限制?

当我在 Windows PC 上安装 WSL2 后,我就安装了一个改编的 CentOS 8.2版本。当我探索它时,我发现我可以开箱即用地在主机的 NTFS 文件系统中进行读写。它也连接到互联网,但我无法找到管理连接的方法;Could not create NMClient object我可以安装网络管理器,但每当运行命令时我都会收到一个nmcli。我没有找到 SELinux ( getenforce)。我安装了firewalld,但随后firewall-cmd会抛出Failed to connect to socket /run/dbus/system_bus_socket. systemctl出现错误System has not been booted with systemd...,然后我了解到Windows 应用商店正在提供“Fedora Remix for WSL”,价格为 9.99 美元,并注明:

以下软件包已从 Fedora Remix for WSL 的默认安装中删除:grub、plymouth、kernel、sssd、linux-firmware、dracut、parted、e2fsprogs、iprutils、ppc64-utils、selinux-policy、policycoreutils、sendmail、firewalld、 fedora-release、fedora-logos 和 fedora-release-notes。

那么,主要问题是:WSL 如何限制 Linux 功能?

那么,我们感兴趣的显然是如何绕过它们:我首先担心的是:与互联网的连接安全吗?在我看来,如果人们可以通过某些服务连接到我的 WSL Linux,则没有防火墙可以阻止他们进入我的主机 PC。关于我上面写的内容:为什么我会收到该错误nmcli?到底有没有可能让 SELinux 运行起来?是否有可能像人们一样管理单位systemctl

centos linux-kernel windows-subsystem-for-linux redhat-enterprise-linux wsl2

5
推荐指数
1
解决办法
1913
查看次数