我注意到使用VSCode终端时缺少许多命令。因此,我在发行版和VSCode的终端上都尝试了ls -l /
。
Linux Mint Xfce终端:
livy@linux-mint:~$ ls -l /
total 2097252
drwxr-xr-x 2 root root 4096 Aug 13 15:13 bin
drwxr-xr-x 4 root root 4096 Aug 13 15:15 boot
drwxr-xr-x 2 root root 4096 Aug 13 15:06 cdrom
drwxr-xr-x 20 root root 4260 Aug 15 08:40 dev
drwxr-xr-x 147 root root 12288 Aug 13 16:46 etc
drwxr-xr-x 4 root root 4096 Aug 13 15:06 home
lrwxrwxrwx 1 root root 33 Aug 13 15:07 initrd.img -> boot/initrd.img-4.15.0-54-generic
lrwxrwxrwx 1 root root 33 Aug 13 15:04 initrd.img.old -> boot/initrd.img-4.15.0-54-generic
drwxr-xr-x 23 root root 4096 Aug 13 15:07 lib
drwxr-xr-x 2 root root 4096 Jul 29 19:15 lib64
drwx------ 2 root root 16384 Aug 13 14:59 lost+found
drwxr-xr-x 2 root root 4096 Jul 29 19:14 media
drwxr-xr-x 2 root root 4096 Jul 29 19:14 mnt
drwxr-xr-x 3 root root 4096 Aug 13 15:18 opt
dr-xr-xr-x 214 root root 0 Aug 15 08:40 proc
drwx------ 4 root root 4096 Aug 13 15:07 root
drwxr-xr-x 32 root root 940 Aug 15 08:41 run
drwxr-xr-x 2 root root 12288 Aug 13 15:14 sbin
drwxr-xr-x 2 root root 4096 Jul 29 19:14 srv
-rw------- 1 root root 2147483648 Aug 15 08:40 swapfile
dr-xr-xr-x 13 root root 0 Aug 15 09:31 sys
drwxrwxrwt 15 root root 4096 Aug 15 08:53 tmp
drwxr-xr-x 11 root root 4096 Jul 29 19:14 usr
drwxr-xr-x 11 root root 4096 Jul 29 19:50 var
lrwxrwxrwx 1 root root 30 Aug 13 15:07 vmlinuz -> boot/vmlinuz-4.15.0-54-generic
这是VSCode终端的结果:
livy@linux-mint:~$ ls -l /
total 2097204
drwxr-xr-x 6 nfsnobody nfsnobody 4096 Aug 13 16:00 app
lrwxrwxrwx 1 livy livy 7 Aug 15 09:13 bin -> usr/bin
drwxr-xr-x 2 livy livy 80 Aug 15 09:13 boot
drwxr-xr-x 2 nfsnobody nfsnobody 4096 Aug 13 15:06 cdrom
drwxr-xr-x 5 livy livy 340 Aug 15 09:13 dev
drwxr-xr-x 15 livy livy 860 Aug 15 09:13 etc
drwxr-xr-x 4 nfsnobody nfsnobody 4096 Aug 13 15:06 home
lrwxrwxrwx 1 livy livy 33 Aug 15 09:13 initrd.img -> boot/initrd.img-4.15.0-54-generic
lrwxrwxrwx 1 livy livy 33 Aug 15 09:13 initrd.img.old -> boot/initrd.img-4.15.0-54-generic
lrwxrwxrwx 1 livy livy 7 Aug 15 09:13 lib -> usr/lib
lrwxrwxrwx 1 livy livy 9 Aug 15 09:13 lib64 -> usr/lib64
drwx------ 2 nfsnobody nfsnobody 16384 Aug 13 14:59 lost+found
drwxr-xr-x 2 nfsnobody nfsnobody 4096 Jul 29 19:14 media
drwxr-xr-x 2 nfsnobody nfsnobody 4096 Jul 29 19:14 mnt
drwxr-xr-x 3 nfsnobody nfsnobody 4096 Aug 13 15:18 opt
dr-xr-xr-x 209 nfsnobody nfsnobody 0 Aug 15 09:13 proc
drwxr-xr-x 6 livy livy 160 Aug 15 09:13 run
lrwxrwxrwx 1 livy livy 8 Aug 15 09:13 sbin -> usr/sbin
drwxr-xr-x 2 nfsnobody nfsnobody 4096 Jul 29 19:14 srv
-rw------- 1 nfsnobody nfsnobody 2147483648 Aug 15 08:40 swapfile
drwxr-xr-x 7 livy livy 140 Aug 15 09:13 sys
drwxr-xr-x 4 livy livy 80 Aug 15 09:13 tmp
drwxr-xr-x 12 nfsnobody nfsnobody 4096 Aug 13 16:00 usr
drwxr-xr-x 7 livy livy 160 Aug 15 09:13 var
lrwxrwxrwx 1 livy livy 30 Aug 15 09:13 vmlinuz -> boot/vmlinuz-4.15.0-54-generic
从文件所有者,权限和修改日期开始……看来他们正在不同的文件系统上工作。 VSCode的/bin
甚至指向/usr/bin
,而在Xfce终端中情况并非如此。奇怪的是,我仍然可以使用VSCode的终端浏览主目录(/home/livy
)并更改文件。它甚至可以获取我的~/.bashrc
文件的内容。
我在这里想念什么?