Ubuntu – Power on/off USB ports

power-managementusb

Is it possible to on/off a specific USB port using the terminal in Ubuntu?

lsusb displays the following result:

Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1020
Bus 002 Device 009: ID 0bc2:a013 Seagate RSS LLC
Bus 002 Device 003: ID 0a5c:219c Broadcom Corp.

Seagate is my external hard disk drive. Can I power it off in the terminal?

I tried Controlling a USB power supply (on/off) with Linux. But I am confused about what should be replaced in place of usbX.

Best Answer

All of the previous answers talk about a USB suspend mechanism, i.e. a "logical power-off", they will never physically cut the VBUS +5V from the USB port.

Only a few hubs can actually cut VBUS as described here.

The hubpower tool can do it (if the hub supports it).

Related Question