Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to fix the problem of USB disk drive in Linux terminal

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to repair the USB drive in the Linux terminal. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Use fsck to remove bad blocks from USB drives

The easiest way to repair flash drives or other types of drives in Linux is to use the fsck tool, which is a powerful tool for removing bad blocks, solving "unreadable" problems, and fixing most file system problems. Before that, however, you need to use the lsblk command to determine the U disk, which lists all the disks connected to the current Linux system.

To delete bad file blocks, execute the fsck command on a specific partition (such as / dev/sdc1) or an entire disk (such as / dev/sdc), and once done, you will get a healthy Linux partition.

Clear USB drive

When it appears that the U disk is completely unreadable and the data in it is worthless, the fix for * * is to use the dd command to completely zero the U disk.

Similarly, use the lsblk command to find the U disk, and then use a command similar to the following to clear the zero:

Sudo dd if=/dev/zero of=/dev/sdb

After the zeroing operation is completed, you need to repartition the disk with fdisk or other tools, and then select the following command to format it for normal use:

FAT32

Sudo mkfs.msdos-f 32 / dev/sdb1

EXT4

Sudo mkfs.ext4-f / dev/sdb1

NTFS

This is the end of the sudo mkfs.ntfs-f / dev/sdb1 article on "how to fix the USB drive problem in the Linux terminal". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report