mvp/uhubctl logo

mvp/uhubctl

Free

uhubctl - USB hub per-port power control

FreeFree tier
Type
Open Source

About mvp/uhubctl

uhubctl is a command-line utility for controlling USB power on a per-port basis for smart USB hubs that implement per-port power switching. It allows users to turn individual USB ports on or off, enabling power cycling of USB devices, resetting unresponsive peripherals, and managing USB power consumption. The tool supports a wide range of USB hubs including those from AmazonBasics, Apple, Belkin, Dell, and many others. It is designed for Linux systems and requires root/sudo privileges. The project is inspired by hub-ctrl.c by Niibe Yutaka.

Key Features

Per-port USB power on/off control on smart hubs
Supports a wide range of USB hubs (see README for list)
Command-line utility for Linux systems
View port status and power state
Works with USB 2.0, 3.0, and 3.1 hubs
Root/sudo required for operation

Pros & Cons

Pros
  • Open source (GPL v2)
  • Lightweight and simple command-line tool
  • Actively maintained with support for many hubs
  • No dependencies beyond standard Linux libraries
  • Per-port granularity for power control
Cons
  • Requires root/sudo privileges
  • Limited to hubs that support per-port power switching (not all hubs)
  • Only works on Linux (no Windows/macOS native support)
  • Some users may need to hunt for a compatible hub

Best For

Power cycle USB devices to troubleshoot connectivity issuesReset unresponsive USB peripherals (e.g., cameras, storage devices)Manage USB power for energy savings or device controlAutomate USB port control in scripts and system administration

FAQ

Which USB hubs are supported by uhubctl?
uhubctl supports smart USB hubs that implement per-port power switching. The README lists many compatible hubs including AmazonBasics HU3641V1, Apple Mac Mini M4 front ports, Belkin F5U101, Dell monitors with USB hubs, and many others. Check the GitHub repository for the full list and product notes.
Does uhubctl work on macOS or Windows?
uhubctl is designed for Linux. There is no native support for macOS or Windows. Users on other systems may need to use a virtual machine or Linux subsystem.