Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I get a list of types of connectivity ports on linux

For example, 1 x HDMI 4 x USB 1x DVI

share|improve this question
up vote 3 down vote accepted

Install the dmidecode package. Then run dmidecode --type 8 as root. You'll see an output block for each connector your motherboard recognizes. For example, here's one my motherboards SATA ports:

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

You can also do something like

sudo dmidecode | grep "Port Type" | sort | uniq -c | cut -b 1-9,20-60

Example output:

  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

The 4 "Other" ports are internal fan connectors.

share|improve this answer
It has to be said that this will only list connectors on the motherboard, and only if the BIOS was correctly programmed to contain this information. Additionally, graphic card ports can be seen by xrandr (if X is running), and audio ports through grep \\\[Jack\\\] /proc/asound/card*/codec#* – Stefan Seidel Feb 12 '13 at 13:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .