在使用 WSL 2 的 Windows 中,linux ubuntu 18.04 LTS 终端中看不到 /mnt/d 内的任何文件

在使用 WSL 2 的 Windows 中,linux ubuntu 18.04 LTS 终端中看不到 /mnt/d 内的任何文件

我是 WSL 新手,我知道如何在 Linux Ubuntu 18.04 中将目录从 更改为C:D:当我将目录从 更改C:D:(在 中/mnt/d)时,我无法D:通过使用dirls命令看到 中已存在的任何文件,并且当我尝试创建一个新文件夹时,它是唯一出现在 Linux 终端中的文件夹,但它不会出现在使用dir命令的 Windows CMD 中,也不会出现在 Windows 文件资源管理器中,即使我在 Windows 文件资源管理器中刷新、重新打开或切换查看隐藏文件复选框。那么我该如何解决这个问题呢?我使用的是 Windows 10 x64 系统和 WSL 2。

已编辑

我的系统中没有文件/etc/wsl.conf。这是我使用命令时的输出mount

/dev/sdd on / type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered)
tmpfs on /mnt/wsl type tmpfs (rw,relatime)
/dev/sdc on /mnt/wsl/docker-desktop-data/isocache type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered)
D:\ on /mnt/wsl/docker-desktop-bind-mounts/Ubuntu-18.04/f37594baee6ec4801fddf040d32f12cf5cbafe9e686121ddf5b37fb3b44445ca type 9p (rw,noatime,dirsync,aname=drvfs;path=D:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8)
none on /mnt/wsl/docker-desktop/shared-sockets/guest-services type tmpfs (rw,nosuid,noexec,noatime,mode=755)
none on /mnt/wsl/docker-desktop/shared-sockets/host-services type tmpfs (rw,nosuid,noexec,noatime,mode=755)
/dev/sdb on /mnt/wsl/docker-desktop/docker-desktop-proxy type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered)
/mnt/host/wsl/docker-desktop-data/isocache/6642e64e24d36fc55392d69dfa17d4927c69176946abdce3108b63b125b4a69a.iso on /mnt/wsl/docker-desktop/cli-tools type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)
tmpfs on /mnt/wsl/docker-desktop-data/tarcache/entries/docker.tar/d7013e1645611ae679e4be13d2f5f5e374677d70b93f325417998764598dbb7c/containers/services/docker/tmp type tmpfs (rw,relatime)
tmpfs on /mnt/wsl/docker-desktop-data/tarcache/entries/docker.tar/d7013e1645611ae679e4be13d2f5f5e374677d70b93f325417998764598dbb7c/containers/services/docker/tmp type tmpfs (rw,relatime)
tmpfs on /mnt/wsl/docker-desktop-data/tarcache/entries/docker.tar/d7013e1645611ae679e4be13d2f5f5e374677d70b93f325417998764598dbb7c/containers/services/docker/tmp type tmpfs (rw,relatime)
overlay on /mnt/wsl/docker-desktop-data/tarcache/entries/docker.tar/d7013e1645611ae679e4be13d2f5f5e374677d70b93f325417998764598dbb7c/containers/services/docker/rootfs type overlay (rw,relatime,lowerdir=/containers/services/docker/lower,upperdir=/containers/services/docker/tmp/upper,workdir=/containers/services/docker/tmp/work)
overlay on /mnt/wsl/docker-desktop-data/tarcache/entries/docker.tar/d7013e1645611ae679e4be13d2f5f5e374677d70b93f325417998764598dbb7c/containers/services/docker/rootfs type overlay (rw,relatime,lowerdir=/containers/services/docker/lower,upperdir=/containers/services/docker/tmp/upper,workdir=/containers/services/docker/tmp/work)
overlay on /mnt/wsl/docker-desktop-data/tarcache/entries/docker.tar/d7013e1645611ae679e4be13d2f5f5e374677d70b93f325417998764598dbb7c/containers/services/docker/rootfs type overlay (rw,relatime,lowerdir=/containers/services/docker/lower,upperdir=/containers/services/docker/tmp/upper,workdir=/containers/services/docker/tmp/work)
tools on /init type 9p (ro,relatime,dirsync,aname=tools;fmask=022,loose,access=client,trans=fd,rfd=6,wfd=6)
none on /dev type devtmpfs (rw,nosuid,relatime,size=3177716k,nr_inodes=794429,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620,ptmxmode=000)
none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime)
none on /run/shm type tmpfs (rw,nosuid,nodev,noatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
C:\ on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8)

相关内容