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 use USB disk under Linux operating system

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to use U disk under Linux operating system". In daily operation, I believe many people have doubts about how to use U disk under Linux operating system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to use U disk under Linux operating system". Next, please follow the editor to study!

Option 1:

Unlike Windows, Linux can be identified automatically after being connected to new hardware. If you can't automatically identify new hardware under Linux, you need to identify it manually. USB removable storage devices are usually identified as sda1, which can be queried through the fdisk-l command.

Before using USB disk, we need to create a new subdirectory for the plug-in point. Generally, the subdirectory of the plug-in point is built in / mnt, and we can also build it there. Of course, we can also build it under the / directory. The name can be selected by ourselves. We will name it usb. The commands under the terminal are as follows:

Mkdir / mnt/usb

Then we can connect my flash drive, and then enter the command under the terminal and press the Enter key:

Mount / dev/sda1 / mnt/usb

When we finish using the flash drive under Windows, we need to delete it before we remove the flash drive. Similarly, under Linux, we also need to delete the starting point of the flash drive by:

Umount / dev/sda1 / mnt/usb or umount / dev/sda1

If you do not drop the flash drive to umount, it is easy to cause data loss.

Option 2:

The key to the support of USB is the driver, and it is certainly impossible to execute mount without a driver. My general method of using USB flash drive in Red Hat is as follows, which works well all the time.

1. Don't plug in the flash drive yet, / sbin/lsmod to see if there is a usb-storage. If not:

Cd / lib/modules/2.4.20-8/kernel/drivers/usb

For v in * .o storage/*.o; do / sbin/insmod $v; done

two。 Here / sbin/lsmod, there should be usbcore, usb-ohci (or usb-uhci, depending on the motherboard chipset), usb-storage, scsi_mod, and so on. Where the status of usb-storage should be (unused).

3. Insert flash drive and keep / sbin/lsmod. During this period, the status of usb-storage should be Initializing, which lasts about half a minute, which is actually equivalent to Windows's constant balloons in the lower right corner:)

4. After initialization, / sbin/fdisk-l, you should see the / dev/sda1 device. At this point, execute

Only mount / dev/sda1 / mnt/udisk can succeed. If it is in MSDOS format and you want to see Chinese, you can

Mount-t vfat / dev/sda1 / mnt/udisk-o iocharset=gb2312.

For convenience, you can add a line to / etc/fstab, and then you can mount / mnt/udisk later.

5. The strange thing is that sometimes fdisk can't see sda1, but it can also be on mount.

Using the above steps to hang up a flash drive can basically be said to be "complete". Desktops, laptops and VMware are all the same.

Mkdir / mnt/usb

Mount / dev/sda1 / mnt/usb

Install linux on notebooks in the same way as desktops

Ps:

First check lsmod | grep usb-storage, which is a module that supports USB. If not, it is impossible to operate the device with the USB interface. If not, you can modprobe usb-storage by hand. Generally, you can use fdisk-l to view the USB disk. You can clearly see the device name of this hardware, which is much more accurate than guessing the hardware name.

At this point, the study on "how to use USB disk under the Linux operating system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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