如何获取 Linux 上的连接端口列表

sia*_*mii 1 ubuntu

如何获取 Linux 上的连接端口类型列表

例如,1 x HDMI 4 x USB 1x DVI

Dav*_*rtz 5

安装dmidecode软件包。然后dmidecode --type 8以root身份运行。您将看到主板识别的每个连接器的输出块。例如,这是我的主板 SATA 端口之一:

Handle 0x0021, DMI type 8, 9 bytes
Port Connector Information
    Internal Reference Designator: SATA1
    Internal Connector Type: SAS/SATA Plug Receptacle
    External Reference Designator: Not Specified
    External Connector Type: None
    Port Type: SATA
Run Code Online (Sandbox Code Playgroud)

你也可以做类似的事情

sudo dmidecode | grep "Port Type" | sort | uniq -c | cut -b 1-9,20-60
Run Code Online (Sandbox Code Playgroud)

示例输出:

  9          Audio Port
  3          Firewire (IEEE P1394)
  1          Keyboard Port
  1          Mouse Port
  1          Network Port
  4          Other
  8          SATA
  1          Serial Port 16550A Compatible
  6          USB
Run Code Online (Sandbox Code Playgroud)

4 个“其他”端口是内部风扇连接器。