25
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

USB抜き差しせずコマンドで再認識

Last updated at Posted at 2015-05-15

USBデバイスが認識おかしくなり抜き差しをやむ得ないことはたまにある。
USBメモリやUSBHDDなどではしょっちゅう。

参考

コマンドでusb再認識

# udevadm info --query=path --name=/dev/video0
/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.2/2-1.2:1.0/video4linux/video0

usb2/2-1

この2-1が該当のパスとなるので以下投入。

# echo -n "2-1" > /sys/bus/usb/drivers/usb/unbind
# echo -n "2-1" > /sys/bus/usb/drivers/usb/bind

usb-hdd

sudo udevadm info --query=path --name=/dev/sdc
/devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.0/host2/target2:0:0/2:0:0:0/block/sdc
echo -n "1-1" > /sys/bus/usb/drivers/usb/unbind
echo -n "1-1" > /sys/bus/usb/drivers/usb/bind
25
34
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?