Nowadays, a small and convenient USB storage device is very common. Although it is small, its storage capacity can be from 16MB to hundredth GB, and the price is getting cheaper (especially 16MB and 32MB of USB flash drive, the price is very low, the price of various mobile hard disk also declines very fast) . There are many reasons for the popular USB device, one of the main reasons is that it is not only easy to carry, but also very convenient to use (you can plug in). Although USB storage devices are already very popular, it is not very convenient to use USB devices in Linux compared to Windows (even if there is not much change in Fedora). So I will introduce one of one for all, as long as the USB storage device is set up, it can be used very conveniently in the machine. Now, as a portable storage device, the use of memory cards is very common. However, to read the contents of the memory card, we generally need a card reader (this type of card is typically used in a digital camera). In addition, since this type of card format is endless, such as CompactFlash, Memory Stick, and SmartMedia, etc., and different cards require different card readers to read, this is not discussed here, and Only general USB storage devices are discussed. The compatibility of the device first we need to understand, not all USB storage devices can be used on Linux, only devices compatible with Linux system can be used in Linux. So, which USB storage device can be used in Linux? When we purchase a USB storage device, the box generally indicates that it can be used in Windows and Mac, or you can use it in Windows 2000 and later you can use it without installing drivers. In general, such a device can be used in Linux. Of course, for various types of card readers, the situation is not the same because there are many cards read. My suggestion is that when buying this type of card, it is best to buy one of the cards. If there is no confidence in your own equipment, then you can talk to others on a Linux forum. See if someone is using this type of device, or search directly in Google, see if anyone is using the equipment you use. Compatibility proposes some suggestions. The search method is very simple, generally as long as the model and Linux entering the device can see the result. Finding your device in Linux In the settings system, we must first understand how it is processed by Linux before using the USB storage device. LINUX's drive mode and SCSI (small machine interface) devices are similar, SCSI is the most popular peripheral device, but now it has been beautiful, because it is more cheaper and more easy to use USB device than it is more competitive. force. The way Linux handles SCSI and USB devices means that both SCSI or USB devices, they will be displayed in the / dev directory in the "hardware browser" and displayed as / sda, / sdb, / sdc, etc. The content depends on the number of devices you installed. In fact, the device name (SDA, SDB, SDC, etc.) shown here is SCSI Device A, B, C, etc. In Fedora, view the easiest way to use the USB device is to use the Hardware Browser. Opening the browser is to click on: System Tools → Hardware Browser. If the current identity is not root, then the system will be required to enter the root password. Then a window will pop up, click on "Hard Drive" in the left side of the window (note not "USB device").
At this time, if the USB storage device is compatible with Linux, then it will appear in this place, and the name is likely to be / dev / sda1 (assuming only one type of device on the machine), if there are multiple this machine Type-type devices, the names it display may be SDB1, SDC1, etc. Two USB storage devices are installed on my machine, one is a 60GB mobile hard disk (there are two partitions), and the other is 128MB of USB flash drive. The results displayed when I run "hard disk browser" are shown in Figure 1. Figure 1 Viewing the USB storage device via a Hardware Browser In addition to viewing a system-connected USB storage device through a hardware browser, you can view it through the fdisk command. Here is the case when running FDisk L on my machine: [root @ myserver root] # fdisk -l Disk / dev / sda: 60.0 GB, 60011642880 BYTES 255 Heads, 63 Sectors / Track, 7296 Cylinders Units = Cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System / dev / sda1 1 3697 29696121 c Win95 FAT32 (LBA) / dev / sda2 3698 7295 28900935 c Win95 FAT32 (LBA) Disk / dev / sdb: 131 MB, 131072000 bytes 5 heads, 50 sectors / track, 1024 cylinders Units = cylinders of 250 * 512 = 128000 bytes Device Boot Start End Blocks Id System / dev / sdb1 1 1024 127975 c Win95 FAT32 (LBA) Disk / dev / hda: 122.9 GB, 122942324736 BYTES ... Conducting If you have seen the content shown in Figure 1, then the system can identify storage devices, but it is now not very convenient to use it. In order to allow USB storage devices to click on a few mice, you can use it to add some content to the USB device in the fstab file. Use an editor to open the / etc / fstab file, then add a line to the USB storage device displayed in Figure 1: / dev / sda1 / mnt / usb1 auto defaults, users, noauto 0 0 Let's come Take a look at the meaning of the row: ◆ The first part "/ dev / sda1" (or "/ dev / sdb1", etc.) is where the system is located. This information can be obtained from the Hardware Browser. 1 refers to the first partition in the first USB device (if only one device is only displayed, the device name is / etc / sda1). ◆ The second part "/ mnt / usb1" is the mount point to use by the device. This mount point can be a folder already existing, or you can create a folder yourself. It should be noted that if you use an existing folder, then the folder is completed, the original content will not be accessible (not lost, you can access the device). ◆ Part III indicated that the file system used by the device, in general, just set it to auto, allow the system to identify the file system used by the device. ◆ The next three parts, "Defaults, Users, NoAuto", some settings for the device (note that between the three is divided by a comma rather than spaces). The DEFAULTS tells the system that uses the default way to handle the device; users allow this machine to use its device for all users; NoAuto tells the system to load the device automatically when starting.