Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.