Resetting USB devices from the command line interface can help solve unresponsive or connection issues, and here is a share on resetting USB devices using simple commands.
Before resetting a USB device, identify it with the lsusb command, which lists all usb devices connected to the system:
lsusb
The connected USB device is displayed in the output. Remember the bus and device number of the USB device you want to reset.
If the USB device has been mounted, you can run the umount command to reset the USB device mount point. Use the df command to view the mounting location of the USB device:
DF-H
Find the USB device in the output, similar to /media/username/device_name.
Run the following command to replace /media/username/device_name with the actual mount point:
sudo umount /media/username/device_name
Uninstall the device and reset it with the usbreset utility. If you do not have usbreset installed, you can install it using the following commands that are appropriate for your specific Linux distribution.
sudo apt install usbutils [on Debian, Ubuntu, and Mint]
sudo yum install usbutils [on RHEL/CentOS/Fedora and Rocky/AlmaLinux]
sudo emerge -a sys-apps/usbutils [on Gentoo Linux]
sudo apk add usbutils [on Alpine Linux]
sudo pacman -S usbutils [on Arch Linux]
sudo zypper install usbutils [on OpenSUSE]
sudo pkg install usbutils [on FreeBSD]
After installation, reset the USB device with the following command, replacing it directly with sudo usbreset /dev/bus/usb/001/004
Bus and device number for your USB device: (e.g. Bus 001 device 004)
sudo usbreset /dev/bus/usb/001/004
You can also use the following command, <device_id> is the ID of the USB device (from the lsusb output) :
sudo usbreset 090c:1000
After resetting the USB device, you can mount it again. If the system does not mount it automatically, you can run the following command to mount it manually:
lsblk
sudo mount /dev/sdX1 /media/username/device_name
Replace /dev/sdX1 with the identifier of your USB device and you can find it using the command lsblk.
Finally, verify that the USB device is running lsusb properly by running the command. If it appears in the list, it has been successfully reset and is ready for use.
Lsusb
Linux Terminal Resetting USB devices is a simple process that can help resolve a variety of issues. The above steps make it easy to identify, uninstall, reset, and reinstall USB devices.