WSL 2 复制具有保留属性的字符设备文件失败
WSL 2 copying character device file with preserve attributes fail
我有 Windows 2004 更新并安装了 WSL2。我是 运行 Debian 发行版,我注意到字符设备文件的保留权限复制失败。以下是我所做的:
test@DESKTOP-8TNVE8F:/mnt/c$ cd ~
test@DESKTOP-8TNVE8F:~$sudo cp -Trpfx /dev/ ~/myTest
结果如下:
cp: preserving permissions for ‘/home/test/myTest/tty1’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/kmsg’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ptmx’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/random’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/urandom’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/null’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/tty’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/tty0’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/zero’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/lxss’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS0’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS1’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS2’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS3’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS4’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS5’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS6’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS7’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS8’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS9’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS10’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS11’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS12’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS13’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS14’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS15’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS16’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS17’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS18’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS19’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS20’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS21’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS22’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS23’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS24’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS25’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS26’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS27’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS28’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS29’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS30’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS31’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS32’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS33’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS34’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS35’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS36’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS37’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS38’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS39’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS40’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS41’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS42’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS43’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS44’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS45’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS46’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS47’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS48’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS49’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS50’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS51’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS52’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS53’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS54’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS55’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS56’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS57’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS58’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS59’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS60’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS61’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS62’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS63’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS64’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS65’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS66’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS67’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS68’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS69’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS70’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS71’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS72’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS73’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS74’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS75’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS76’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS77’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS78’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS79’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS80’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS81’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS82’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS83’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS84’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS85’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS86’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS87’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS88’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS89’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS90’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS91’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS92’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS93’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS94’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS95’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS96’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS97’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS98’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS99’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS100’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS101’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS102’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS103’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS104’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS105’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS106’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS107’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS108’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS109’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS110’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS111’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS112’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS113’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS114’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS115’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS116’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS117’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS118’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS119’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS120’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS121’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS122’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS123’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS124’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS125’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS126’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS127’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS128’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS129’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS130’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS131’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS132’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS133’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS134’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS135’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS136’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS137’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS138’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS139’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS140’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS141’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS142’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS143’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS144’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS145’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS146’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS147’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS148’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS149’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS150’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS151’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS152’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS153’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS154’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS155’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS156’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS157’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS158’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS159’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS160’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS161’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS162’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS163’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS164’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS165’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS166’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS167’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS168’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS169’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS170’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS171’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS172’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS173’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS174’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS175’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS176’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS177’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS178’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS179’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS180’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS181’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS182’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS183’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS184’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS185’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS186’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS187’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS188’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS189’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS190’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS191’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/tty2’: Operation not permitted
这是 WSL2 的一些已知限制吗?是否有针对此问题的 workaround/fix?
onoma@:~$ sudo cp -Trpfx /dev/ ~/myTest
onoma@:~$ ll myTest/
total 32
drwxr-xr-x 8 root root 4096 Jun 8 16:07 ./
drwxr-xr-x 10 onoma onoma 4096 Jun 8 16:11 ../
crw-r--r-- 1 root root 10, 235 Jun 5 23:42 autofs
drwxr-xr-x 2 root root 4096 Jun 5 23:42 block/
drwxr-xr-x 2 root root 4096 Jun 8 16:07 bsg/
crw------- 1 root root 10, 234 Jun 5 23:42 btrfs-control
crw------- 1 root root 5, 1 Jun 5 23:42 console
crw------- 1 root root 10, 62 Jun 5 23:42 cpu_dma_latency
crw------- 1 root root 10, 203 Jun 5 23:42 cuse
lrwxrwxrwx 1 root root 13 Jun 5 23:42 fd -> /proc/self/fd/
crw-rw-rw- 1 root root 1, 7 Jun 5 23:42 full
crw-rw-rw- 1 root root 10, 229 Jun 5 23:42 fuse
crw-r--r-- 1 root root 1, 11 Jun 5 23:42 kmsg
crw------- 1 root root 10, 237 Jun 5 23:42 loop-control
brw------- 1 root root 7, 0 Jun 5 23:42 loop0
brw------- 1 root root 7, 1 Jun 5 23:42 loop1
brw------- 1 root root 7, 2 Jun 5 23:42 loop2
brw------- 1 root root 7, 3 Jun 5 23:42 loop3
brw------- 1 root root 7, 4 Jun 5 23:42 loop4
brw------- 1 root root 7, 5 Jun 5 23:42 loop5
brw------- 1 root root 7, 6 Jun 5 23:42 loop6
brw------- 1 root root 7, 7 Jun 5 23:42 loop7
drwxr-xr-x 2 root root 4096 Jun 5 23:42 mapper/
crw------- 1 root root 1, 1 Jun 5 23:42 mem
crw------- 1 root root 10, 59 Jun 5 23:42 memory_bandwidth
drwxr-xr-x 2 root root 4096 Jun 5 23:42 net/
crw------- 1 root root 10, 61 Jun 5 23:42 network_latency
crw------- 1 root root 10, 60 Jun 5 23:42 network_throughput
crw-rw-rw- 1 root root 1, 3 Jun 5 23:42 null
crw------- 1 root root 10, 144 Jun 5 23:42 nvram
crw------- 1 root root 108, 0 Jun 5 23:42 ppp
crw-rw-rw- 1 root root 5, 2 Jun 8 16:11 ptmx
drwxr-xr-x 2 root root 4096 Jun 5 23:42 pts/
brw------- 1 root root 1, 0 Jun 5 23:42 ram0
brw------- 1 root root 1, 1 Jun 5 23:42 ram1
brw------- 1 root root 1, 10 Jun 5 23:42 ram10
brw------- 1 root root 1, 11 Jun 5 23:42 ram11
brw------- 1 root root 1, 12 Jun 5 23:42 ram12
brw------- 1 root root 1, 13 Jun 5 23:42 ram13
brw------- 1 root root 1, 14 Jun 5 23:42 ram14
brw------- 1 root root 1, 15 Jun 5 23:42 ram15
brw------- 1 root root 1, 2 Jun 5 23:42 ram2
brw------- 1 root root 1, 3 Jun 5 23:42 ram3
brw------- 1 root root 1, 4 Jun 5 23:42 ram4
brw------- 1 root root 1, 5 Jun 5 23:42 ram5
brw------- 1 root root 1, 6 Jun 5 23:42 ram6
brw------- 1 root root 1, 7 Jun 5 23:42 ram7
brw------- 1 root root 1, 8 Jun 5 23:42 ram8
brw------- 1 root root 1, 9 Jun 5 23:42 ram9
crw-rw-rw- 1 root root 1, 8 Jun 5 23:42 random
crw------- 1 root root 251, 0 Jun 5 23:42 rtc0
brw------- 1 root root 8, 0 Jun 5 23:42 sda
brw------- 1 root root 8, 16 Jun 5 23:42 sdb
brw------- 1 root root 8, 32 Jun 5 23:42 sdc
brw------- 1 root root 8, 48 Jun 8 16:07 sdd
crw------- 1 root root 21, 0 Jun 5 23:42 sg0
crw------- 1 root root 21, 1 Jun 5 23:42 sg1
crw------- 1 root root 21, 2 Jun 5 23:42 sg2
crw------- 1 root root 21, 3 Jun 8 16:07 sg3
lrwxrwxrwx 1 root root 8 Jun 5 23:42 shm -> /run/shm/
lrwxrwxrwx 1 root root 15 Jun 5 23:42 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Jun 5 23:42 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Jun 5 23:42 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root root 5, 0 Jun 8 16:08 tty
crw------- 1 root root 4, 0 Jun 5 23:42 tty0
crw------- 1 root root 4, 1 Jun 5 23:42 tty1
crw------- 1 root root 4, 10 Jun 5 23:42 tty10
crw------- 1 root root 4, 11 Jun 5 23:42 tty11
crw------- 1 root root 4, 12 Jun 5 23:42 tty12
crw------- 1 root root 4, 13 Jun 5 23:42 tty13
crw------- 1 root root 4, 14 Jun 5 23:42 tty14
crw------- 1 root root 4, 15 Jun 5 23:42 tty15
crw------- 1 root root 4, 16 Jun 5 23:42 tty16
crw------- 1 root root 4, 17 Jun 5 23:42 tty17
crw------- 1 root root 4, 18 Jun 5 23:42 tty18
crw------- 1 root root 4, 19 Jun 5 23:42 tty19
crw------- 1 root root 4, 2 Jun 5 23:42 tty2
crw------- 1 root root 4, 20 Jun 5 23:42 tty20
crw------- 1 root root 4, 21 Jun 5 23:42 tty21
crw------- 1 root root 4, 22 Jun 5 23:42 tty22
crw------- 1 root root 4, 23 Jun 5 23:42 tty23
crw------- 1 root root 4, 24 Jun 5 23:42 tty24
crw------- 1 root root 4, 25 Jun 5 23:42 tty25
crw------- 1 root root 4, 26 Jun 5 23:42 tty26
crw------- 1 root root 4, 27 Jun 5 23:42 tty27
crw------- 1 root root 4, 28 Jun 5 23:42 tty28
crw------- 1 root root 4, 29 Jun 5 23:42 tty29
crw------- 1 root root 4, 3 Jun 5 23:42 tty3
crw------- 1 root root 4, 30 Jun 5 23:42 tty30
crw------- 1 root root 4, 31 Jun 5 23:42 tty31
crw------- 1 root root 4, 32 Jun 5 23:42 tty32
crw------- 1 root root 4, 33 Jun 5 23:42 tty33
crw------- 1 root root 4, 34 Jun 5 23:42 tty34
crw------- 1 root root 4, 35 Jun 5 23:42 tty35
crw------- 1 root root 4, 36 Jun 5 23:42 tty36
crw------- 1 root root 4, 37 Jun 5 23:42 tty37
crw------- 1 root root 4, 38 Jun 5 23:42 tty38
crw------- 1 root root 4, 39 Jun 5 23:42 tty39
crw------- 1 root root 4, 4 Jun 5 23:42 tty4
crw------- 1 root root 4, 40 Jun 5 23:42 tty40
crw------- 1 root root 4, 41 Jun 5 23:42 tty41
crw------- 1 root root 4, 42 Jun 5 23:42 tty42
crw------- 1 root root 4, 43 Jun 5 23:42 tty43
crw------- 1 root root 4, 44 Jun 5 23:42 tty44
crw------- 1 root root 4, 45 Jun 5 23:42 tty45
crw------- 1 root root 4, 46 Jun 5 23:42 tty46
crw------- 1 root root 4, 47 Jun 5 23:42 tty47
crw------- 1 root root 4, 48 Jun 5 23:42 tty48
crw------- 1 root root 4, 49 Jun 5 23:42 tty49
crw------- 1 root root 4, 5 Jun 5 23:42 tty5
crw------- 1 root root 4, 50 Jun 5 23:42 tty50
crw------- 1 root root 4, 51 Jun 5 23:42 tty51
crw------- 1 root root 4, 52 Jun 5 23:42 tty52
crw------- 1 root root 4, 53 Jun 5 23:42 tty53
crw------- 1 root root 4, 54 Jun 5 23:42 tty54
crw------- 1 root root 4, 55 Jun 5 23:42 tty55
crw------- 1 root root 4, 56 Jun 5 23:42 tty56
crw------- 1 root root 4, 57 Jun 5 23:42 tty57
crw------- 1 root root 4, 58 Jun 5 23:42 tty58
crw------- 1 root root 4, 59 Jun 5 23:42 tty59
crw------- 1 root root 4, 6 Jun 5 23:42 tty6
crw------- 1 root root 4, 60 Jun 5 23:42 tty60
crw------- 1 root root 4, 61 Jun 5 23:42 tty61
crw------- 1 root root 4, 62 Jun 5 23:42 tty62
crw------- 1 root root 4, 63 Jun 5 23:42 tty63
crw------- 1 root root 4, 7 Jun 5 23:42 tty7
crw------- 1 root root 4, 8 Jun 5 23:42 tty8
crw------- 1 root root 4, 9 Jun 5 23:42 tty9
crw------- 1 root root 4, 64 Jun 5 23:42 ttyS0
crw------- 1 root root 4, 65 Jun 5 23:42 ttyS1
crw------- 1 root root 4, 66 Jun 5 23:42 ttyS2
crw------- 1 root root 4, 67 Jun 5 23:42 ttyS3
crw-rw-rw- 1 root root 1, 9 Jun 5 23:42 urandom
crw------- 1 root root 7, 0 Jun 5 23:42 vcs
crw------- 1 root root 7, 1 Jun 5 23:42 vcs1
crw------- 1 root root 7, 128 Jun 5 23:42 vcsa
crw------- 1 root root 7, 129 Jun 5 23:42 vcsa1
crw------- 1 root root 7, 64 Jun 5 23:42 vcsu
crw------- 1 root root 7, 65 Jun 5 23:42 vcsu1
drwxr-xr-x 2 root root 4096 Jun 5 23:42 vfio/
crw------- 1 root root 10, 238 Jun 5 23:42 vhost-net
crw------- 1 root root 10, 63 Jun 5 23:42 vsock
crw-rw-rw- 1 root root 1, 5 Jun 5 23:42 zero
无法在 Ubuntu 20.04 中重现。确保您是 运行 WSL2 实例 (wsl.exe -l -v) 并且您的用户来自 sudo 组。
我有 Windows 2004 更新并安装了 WSL2。我是 运行 Debian 发行版,我注意到字符设备文件的保留权限复制失败。以下是我所做的:
test@DESKTOP-8TNVE8F:/mnt/c$ cd ~
test@DESKTOP-8TNVE8F:~$sudo cp -Trpfx /dev/ ~/myTest
结果如下:
cp: preserving permissions for ‘/home/test/myTest/tty1’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/kmsg’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ptmx’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/random’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/urandom’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/null’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/tty’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/tty0’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/zero’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/lxss’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS0’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS1’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS2’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS3’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS4’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS5’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS6’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS7’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS8’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS9’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS10’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS11’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS12’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS13’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS14’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS15’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS16’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS17’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS18’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS19’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS20’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS21’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS22’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS23’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS24’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS25’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS26’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS27’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS28’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS29’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS30’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS31’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS32’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS33’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS34’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS35’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS36’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS37’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS38’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS39’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS40’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS41’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS42’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS43’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS44’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS45’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS46’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS47’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS48’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS49’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS50’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS51’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS52’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS53’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS54’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS55’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS56’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS57’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS58’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS59’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS60’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS61’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS62’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS63’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS64’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS65’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS66’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS67’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS68’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS69’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS70’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS71’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS72’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS73’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS74’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS75’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS76’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS77’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS78’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS79’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS80’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS81’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS82’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS83’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS84’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS85’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS86’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS87’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS88’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS89’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS90’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS91’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS92’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS93’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS94’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS95’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS96’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS97’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS98’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS99’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS100’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS101’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS102’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS103’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS104’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS105’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS106’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS107’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS108’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS109’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS110’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS111’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS112’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS113’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS114’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS115’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS116’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS117’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS118’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS119’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS120’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS121’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS122’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS123’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS124’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS125’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS126’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS127’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS128’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS129’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS130’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS131’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS132’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS133’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS134’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS135’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS136’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS137’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS138’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS139’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS140’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS141’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS142’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS143’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS144’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS145’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS146’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS147’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS148’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS149’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS150’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS151’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS152’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS153’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS154’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS155’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS156’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS157’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS158’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS159’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS160’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS161’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS162’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS163’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS164’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS165’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS166’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS167’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS168’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS169’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS170’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS171’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS172’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS173’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS174’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS175’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS176’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS177’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS178’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS179’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS180’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS181’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS182’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS183’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS184’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS185’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS186’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS187’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS188’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS189’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS190’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/ttyS191’: Operation not permitted
cp: preserving permissions for ‘/home/test/myTest/tty2’: Operation not permitted
这是 WSL2 的一些已知限制吗?是否有针对此问题的 workaround/fix?
onoma@:~$ sudo cp -Trpfx /dev/ ~/myTest
onoma@:~$ ll myTest/
total 32
drwxr-xr-x 8 root root 4096 Jun 8 16:07 ./
drwxr-xr-x 10 onoma onoma 4096 Jun 8 16:11 ../
crw-r--r-- 1 root root 10, 235 Jun 5 23:42 autofs
drwxr-xr-x 2 root root 4096 Jun 5 23:42 block/
drwxr-xr-x 2 root root 4096 Jun 8 16:07 bsg/
crw------- 1 root root 10, 234 Jun 5 23:42 btrfs-control
crw------- 1 root root 5, 1 Jun 5 23:42 console
crw------- 1 root root 10, 62 Jun 5 23:42 cpu_dma_latency
crw------- 1 root root 10, 203 Jun 5 23:42 cuse
lrwxrwxrwx 1 root root 13 Jun 5 23:42 fd -> /proc/self/fd/
crw-rw-rw- 1 root root 1, 7 Jun 5 23:42 full
crw-rw-rw- 1 root root 10, 229 Jun 5 23:42 fuse
crw-r--r-- 1 root root 1, 11 Jun 5 23:42 kmsg
crw------- 1 root root 10, 237 Jun 5 23:42 loop-control
brw------- 1 root root 7, 0 Jun 5 23:42 loop0
brw------- 1 root root 7, 1 Jun 5 23:42 loop1
brw------- 1 root root 7, 2 Jun 5 23:42 loop2
brw------- 1 root root 7, 3 Jun 5 23:42 loop3
brw------- 1 root root 7, 4 Jun 5 23:42 loop4
brw------- 1 root root 7, 5 Jun 5 23:42 loop5
brw------- 1 root root 7, 6 Jun 5 23:42 loop6
brw------- 1 root root 7, 7 Jun 5 23:42 loop7
drwxr-xr-x 2 root root 4096 Jun 5 23:42 mapper/
crw------- 1 root root 1, 1 Jun 5 23:42 mem
crw------- 1 root root 10, 59 Jun 5 23:42 memory_bandwidth
drwxr-xr-x 2 root root 4096 Jun 5 23:42 net/
crw------- 1 root root 10, 61 Jun 5 23:42 network_latency
crw------- 1 root root 10, 60 Jun 5 23:42 network_throughput
crw-rw-rw- 1 root root 1, 3 Jun 5 23:42 null
crw------- 1 root root 10, 144 Jun 5 23:42 nvram
crw------- 1 root root 108, 0 Jun 5 23:42 ppp
crw-rw-rw- 1 root root 5, 2 Jun 8 16:11 ptmx
drwxr-xr-x 2 root root 4096 Jun 5 23:42 pts/
brw------- 1 root root 1, 0 Jun 5 23:42 ram0
brw------- 1 root root 1, 1 Jun 5 23:42 ram1
brw------- 1 root root 1, 10 Jun 5 23:42 ram10
brw------- 1 root root 1, 11 Jun 5 23:42 ram11
brw------- 1 root root 1, 12 Jun 5 23:42 ram12
brw------- 1 root root 1, 13 Jun 5 23:42 ram13
brw------- 1 root root 1, 14 Jun 5 23:42 ram14
brw------- 1 root root 1, 15 Jun 5 23:42 ram15
brw------- 1 root root 1, 2 Jun 5 23:42 ram2
brw------- 1 root root 1, 3 Jun 5 23:42 ram3
brw------- 1 root root 1, 4 Jun 5 23:42 ram4
brw------- 1 root root 1, 5 Jun 5 23:42 ram5
brw------- 1 root root 1, 6 Jun 5 23:42 ram6
brw------- 1 root root 1, 7 Jun 5 23:42 ram7
brw------- 1 root root 1, 8 Jun 5 23:42 ram8
brw------- 1 root root 1, 9 Jun 5 23:42 ram9
crw-rw-rw- 1 root root 1, 8 Jun 5 23:42 random
crw------- 1 root root 251, 0 Jun 5 23:42 rtc0
brw------- 1 root root 8, 0 Jun 5 23:42 sda
brw------- 1 root root 8, 16 Jun 5 23:42 sdb
brw------- 1 root root 8, 32 Jun 5 23:42 sdc
brw------- 1 root root 8, 48 Jun 8 16:07 sdd
crw------- 1 root root 21, 0 Jun 5 23:42 sg0
crw------- 1 root root 21, 1 Jun 5 23:42 sg1
crw------- 1 root root 21, 2 Jun 5 23:42 sg2
crw------- 1 root root 21, 3 Jun 8 16:07 sg3
lrwxrwxrwx 1 root root 8 Jun 5 23:42 shm -> /run/shm/
lrwxrwxrwx 1 root root 15 Jun 5 23:42 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Jun 5 23:42 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Jun 5 23:42 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root root 5, 0 Jun 8 16:08 tty
crw------- 1 root root 4, 0 Jun 5 23:42 tty0
crw------- 1 root root 4, 1 Jun 5 23:42 tty1
crw------- 1 root root 4, 10 Jun 5 23:42 tty10
crw------- 1 root root 4, 11 Jun 5 23:42 tty11
crw------- 1 root root 4, 12 Jun 5 23:42 tty12
crw------- 1 root root 4, 13 Jun 5 23:42 tty13
crw------- 1 root root 4, 14 Jun 5 23:42 tty14
crw------- 1 root root 4, 15 Jun 5 23:42 tty15
crw------- 1 root root 4, 16 Jun 5 23:42 tty16
crw------- 1 root root 4, 17 Jun 5 23:42 tty17
crw------- 1 root root 4, 18 Jun 5 23:42 tty18
crw------- 1 root root 4, 19 Jun 5 23:42 tty19
crw------- 1 root root 4, 2 Jun 5 23:42 tty2
crw------- 1 root root 4, 20 Jun 5 23:42 tty20
crw------- 1 root root 4, 21 Jun 5 23:42 tty21
crw------- 1 root root 4, 22 Jun 5 23:42 tty22
crw------- 1 root root 4, 23 Jun 5 23:42 tty23
crw------- 1 root root 4, 24 Jun 5 23:42 tty24
crw------- 1 root root 4, 25 Jun 5 23:42 tty25
crw------- 1 root root 4, 26 Jun 5 23:42 tty26
crw------- 1 root root 4, 27 Jun 5 23:42 tty27
crw------- 1 root root 4, 28 Jun 5 23:42 tty28
crw------- 1 root root 4, 29 Jun 5 23:42 tty29
crw------- 1 root root 4, 3 Jun 5 23:42 tty3
crw------- 1 root root 4, 30 Jun 5 23:42 tty30
crw------- 1 root root 4, 31 Jun 5 23:42 tty31
crw------- 1 root root 4, 32 Jun 5 23:42 tty32
crw------- 1 root root 4, 33 Jun 5 23:42 tty33
crw------- 1 root root 4, 34 Jun 5 23:42 tty34
crw------- 1 root root 4, 35 Jun 5 23:42 tty35
crw------- 1 root root 4, 36 Jun 5 23:42 tty36
crw------- 1 root root 4, 37 Jun 5 23:42 tty37
crw------- 1 root root 4, 38 Jun 5 23:42 tty38
crw------- 1 root root 4, 39 Jun 5 23:42 tty39
crw------- 1 root root 4, 4 Jun 5 23:42 tty4
crw------- 1 root root 4, 40 Jun 5 23:42 tty40
crw------- 1 root root 4, 41 Jun 5 23:42 tty41
crw------- 1 root root 4, 42 Jun 5 23:42 tty42
crw------- 1 root root 4, 43 Jun 5 23:42 tty43
crw------- 1 root root 4, 44 Jun 5 23:42 tty44
crw------- 1 root root 4, 45 Jun 5 23:42 tty45
crw------- 1 root root 4, 46 Jun 5 23:42 tty46
crw------- 1 root root 4, 47 Jun 5 23:42 tty47
crw------- 1 root root 4, 48 Jun 5 23:42 tty48
crw------- 1 root root 4, 49 Jun 5 23:42 tty49
crw------- 1 root root 4, 5 Jun 5 23:42 tty5
crw------- 1 root root 4, 50 Jun 5 23:42 tty50
crw------- 1 root root 4, 51 Jun 5 23:42 tty51
crw------- 1 root root 4, 52 Jun 5 23:42 tty52
crw------- 1 root root 4, 53 Jun 5 23:42 tty53
crw------- 1 root root 4, 54 Jun 5 23:42 tty54
crw------- 1 root root 4, 55 Jun 5 23:42 tty55
crw------- 1 root root 4, 56 Jun 5 23:42 tty56
crw------- 1 root root 4, 57 Jun 5 23:42 tty57
crw------- 1 root root 4, 58 Jun 5 23:42 tty58
crw------- 1 root root 4, 59 Jun 5 23:42 tty59
crw------- 1 root root 4, 6 Jun 5 23:42 tty6
crw------- 1 root root 4, 60 Jun 5 23:42 tty60
crw------- 1 root root 4, 61 Jun 5 23:42 tty61
crw------- 1 root root 4, 62 Jun 5 23:42 tty62
crw------- 1 root root 4, 63 Jun 5 23:42 tty63
crw------- 1 root root 4, 7 Jun 5 23:42 tty7
crw------- 1 root root 4, 8 Jun 5 23:42 tty8
crw------- 1 root root 4, 9 Jun 5 23:42 tty9
crw------- 1 root root 4, 64 Jun 5 23:42 ttyS0
crw------- 1 root root 4, 65 Jun 5 23:42 ttyS1
crw------- 1 root root 4, 66 Jun 5 23:42 ttyS2
crw------- 1 root root 4, 67 Jun 5 23:42 ttyS3
crw-rw-rw- 1 root root 1, 9 Jun 5 23:42 urandom
crw------- 1 root root 7, 0 Jun 5 23:42 vcs
crw------- 1 root root 7, 1 Jun 5 23:42 vcs1
crw------- 1 root root 7, 128 Jun 5 23:42 vcsa
crw------- 1 root root 7, 129 Jun 5 23:42 vcsa1
crw------- 1 root root 7, 64 Jun 5 23:42 vcsu
crw------- 1 root root 7, 65 Jun 5 23:42 vcsu1
drwxr-xr-x 2 root root 4096 Jun 5 23:42 vfio/
crw------- 1 root root 10, 238 Jun 5 23:42 vhost-net
crw------- 1 root root 10, 63 Jun 5 23:42 vsock
crw-rw-rw- 1 root root 1, 5 Jun 5 23:42 zero
无法在 Ubuntu 20.04 中重现。确保您是 运行 WSL2 实例 (wsl.exe -l -v) 并且您的用户来自 sudo 组。