/dev/tcp 去哪儿了?

9 linux debian tcp

/dev/tcp许多来源中经常提到它,我想我不久前在 Ubuntu 中看到过它。现在,在 Debian Jessie 中,我找不到它。与 相同/dev/udp

tomasz@E4200:/dev$ ls
agpgart          dm-1     hidraw3       network_latency     sda2      tty11  tty24  tty37  tty5   tty62    vcs2   vfio
autofs           dm-2     hpet          network_throughput  sda5      tty12  tty25  tty38  tty50  tty63    vcs3   vga_arbiter
block            dm-3     hugepages     null                sg0       tty13  tty26  tty39  tty51  tty7     vcs4   vhci
bsg              dm-4     initctl       port                shm       tty14  tty27  tty4   tty52  tty8     vcs5   vhost-net
btrfs-control    dm-5     input         ppp                 snapshot  tty15  tty28  tty40  tty53  tty9     vcs6   watchdog
bus              dri      kmsg          psaux               snd       tty16  tty29  tty41  tty54  ttyS0    vcs7   watchdog0
char             fb0      kvm           ptmx                stderr    tty17  tty3   tty42  tty55  ttyS1    vcsa   xconsole
console          fd       log           pts                 stdin     tty18  tty30  tty43  tty56  ttyS2    vcsa1  zero
core             full     loop-control  random              stdout    tty19  tty31  tty44  tty57  ttyS3    vcsa2
cpu              fuse     mapper        rfkill              tomas-vg  tty2   tty32  tty45  tty58  uhid     vcsa3
cpu_dma_latency  fw0      mcelog        rtc                 tty       tty20  tty33  tty46  tty59  uinput   vcsa4
cuse             hidraw0  mem           rtc0                tty0      tty21  tty34  tty47  tty6   urandom  vcsa5
disk             hidraw1  mqueue        sda                 tty1      tty22  tty35  tty48  tty60  vcs      vcsa6
dm-0             hidraw2  net           sda1                tty10     tty23  tty36  tty49  tty61  vcs1     vcsa7
Run Code Online (Sandbox Code Playgroud)

它移动到什么地方了吗?(为什么?)这是否适用于所有 Linux?

为了完成它,我在:

Linux E4200 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

更新

/dev/tcp not found没有回答我的问题。

这个答案:

当您/dev/tcp/74.125.225.19/80在管道中使用时,bash尝试运行名为的命令/dev/tcp/74.125.225.19/80并报告错误,因为该文件不存在。

没有告诉我太多关于/dev/tcp. 重定向部分都没有链接。

我从我的问题的第一个答案中收集了/dev/tcp一个“虚拟”文件夹。请发布一个解释这一点的链接。如果您知道,请回答是否一直如此。

Ipo*_*cer 19

/dev/{tcp,udp}只是 bash 内部结构。/proc/net/{tcp,udp}内核存储的 tcp 和 udp 套接字

  • 并非总是如此,自 2.4.x 时代以来。(2001) (4认同)
  • 不仅仅是一个“bash”内部;还有`ksh93`。 (2认同)