This guide provides a step-by-step process for resetting a malfunctioning USB device via the Linux command line. Troubleshooting unresponsive or disconnected USB drives is simplified using these commands.
Step 1: Identifying Your USB Device
First, identify the USB device using the lsusb
command. This lists all connected USB devices.
lsusb
The output will show a list; note the bus and device number (e.g., Bus 001 Device 004
) of the target USB device.
Step 2: Unmounting the USB Drive
Before resetting, unmount the device if it's currently mounted. Use the df -h
command to locate the mount point (usually something like /media/username/device_name
).
df -h
Then, unmount using sudo umount
, replacing /media/username/device_name
with the actual mount point:
sudo umount /media/username/device_name
Step 3: Resetting the USB Device
Install the usbreset
utility if it's not already present. The installation command varies by distribution:
# Debian, Ubuntu, Mint: sudo apt install usbutils # RHEL/CentOS/Fedora, Rocky/AlmaLinux: sudo yum install usbutils # Gentoo Linux: sudo emerge -a sys-apps/usbutils # Alpine Linux: sudo apk add usbutils # Arch Linux: sudo pacman -S usbutils # OpenSUSE: sudo zypper install usbutils # FreeBSD: sudo pkg install usbutils
After installation, reset the device using either the bus and device number or the device ID (from the lsusb
output):
# Using bus and device number: sudo usbreset /dev/bus/usb/001/004 # Using device ID: sudo usbreset 090c:1000
Step 4: Remounting the USB Device
After the reset, remount the device. If it doesn't remount automatically, use lsblk
to find the device identifier (e.g., /dev/sdX1
) and then remount:
lsblk sudo mount /dev/sdX1 /media/username/device_name
Verify the reset by running lsusb
again. The device should reappear in the list.
Conclusion: This CLI method offers a simple and efficient way to troubleshoot and restore functionality to your USB devices in Linux. Remember to replace placeholders with your specific device information.
The above is the detailed content of How to Reset a USB Device from the Linux Terminal. For more information, please follow other related articles on the PHP Chinese website!

Linux systems rely on firewalls to safeguard against unauthorized network access. These software barriers control network traffic, permitting or blocking data packets based on predefined rules. Operating primarily at the network layer, they manage

Determining if your Linux system is a desktop or laptop is crucial for system optimization. This guide outlines simple commands to identify your system type. The hostnamectl Command: This command provides a concise way to check your system's chassis

Guide to adjust the number of TCP/IP connections for Linux servers Linux systems are often used in servers and network applications. Administrators often encounter the problem that the number of TCP/IP connections reaches the upper limit, resulting in user connection errors. This article will guide you how to improve the maximum number of TCP/IP connections in Linux systems. Understanding TCP/IP connection number TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication protocol of the Internet. Each TCP connection requires system resources. When there are too many active connections, the system may reject new connections or slow down. By increasing the maximum number of connections allowed, server performance can be improved and more concurrent users can be handled. Check the current number of Linux connections limits Change settings

SVG (Scalable Vector Graphics) files are ideal for logos and illustrations due to their resizability without quality loss. However, PNG (Portable Network Graphics) format often offers better compatibility with websites and applications. This guide d

LiveCode: A Cross-Platform Development Revolution LiveCode, a programming language debuting in 1993, simplifies app development for everyone. Its high-level, English-like syntax and dynamic typing enable the creation of robust applications with ease

This guide provides a step-by-step process for resetting a malfunctioning USB device via the Linux command line. Troubleshooting unresponsive or disconnected USB drives is simplified using these commands. Step 1: Identifying Your USB Device First, i

Temporarily setting a static IP address on Linux is invaluable for network troubleshooting or specific session configurations. This guide details how to achieve this using command-line tools, noting that the changes are not persistent across reboots

Linux is known for its powerful set of command-line tools that allow users to interact with the system efficiently. While many Linux users are familiar with common commands such as ls, cd, or grep, there are also few lesser-known but extremely useful commands and shortcuts that can simplify and increase productivity. We are excited to share our latest five articles on "less known Linux commands" with over 50 commands you may not know about. You may also like: 11 little-known practical Linux commands – Part 1 10 little-known Linux commands – Part 2 10 little-known Linux commands – Part 3 10 little-known valid Linux commands


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Zend Studio 13.0.1
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
