How to use USB storage in a Linux environment

  
                              

How do I use a USB-based storage device in a Linux environment? This is a problem that has appeared on the major computer forums. It can be seen that this is also a problem faced by many computer players. This article will provide you with a perfect solution. In the following way, you can easily use U disk, USB hard disk box in Linux environment, and also use digital camera as USB mass storage. Here is a step-by-step introduction to how to use USB storage in a Linux environment using Red Hat Linux 7.2 as an example.

1. Open the "Control Center" in the X-Windows environment, expand the "Information → USB Device" console tree, and check if Linux has correctly recognized your USB storage. If you do not see the USB device information, Then you should check if the USB port is already open in the BIOS, or if the physical connection between the USB memory and the computer is not connected. Figure 1 shows the author's FinePix digital camera information.



2. In the console state, enter the following command:

fdisk -l /dev/sda

Note: Do not sda Add the wildcard "*" or "?", otherwise the information returned after running the command will not be normal. If you have multiple USB devices, the device names are represented as sda, sdb, sdc, etc. under Linux.

After running the above command, the author returns the information shown in Figure 2, indicating that the system has found the author's USB device, the device name is /dev/sda1, it can be started (the * below the Boot) Is the active partition), the capacity is 8MB, and the file system is FAT12.



3. Create a directory for mounting USB storage in the /mnt directory:

mkdir /mnt/usb

4. Then run the load device command to mount the USB device to the /mnt/usb directory:

mount -t msdos /dev/sda1 /mnt/usb

Note: If in Figure 2 The file system of your USB device is FAT32. Please use the mount -t vfat /dev/sda1 /mnt/usb command to load the USB device.

5. Run the following command to view the file information in the USB memory:

ls /mnt/usb

Then you can treat the USB memory like a hard disk. The data is copied, deleted, etc.

If you are not used to typing in the console, you can also create a shortcut to the USB storage on the KDE desktop, and use the mouse to complete all file operations, just as simple as in Windows. The operation of creating a shortcut is very simple: use the mouse to click the mouse in the blank space of the desktop, select "New /Hard Disk" from the pop-up shortcut menu, right-click the newly created shortcut, select the "Properties" menu command, switch to " Device tab, enter the device name, mount point and file system type of the USB memory, as shown in Figure 3. In the future, you only need to click the shortcut to easily access the USB memory.



Copyright © Windows knowledge All Rights Reserved