Mounting a USB flash disk in Linux
The environment of this routine is in fc6 and operated through a terminal.
Note that you must have the administrator privilege to mount the USB flash drive.
Switch to administrator and enter:
Su Root
Then, enter the administrator password for password authentication;
After successful creation, create a folder named USB under/mnt. The folder name is random:
Mkdir/mnt/USB
Enter fdisk-L to view the disk partition information:
Insert the USB flash drive into the USB interface of the computer, and then enter:
Fdisk-l
Check the disk partition changes. We can see an extra/dev/sdb1 partition in the middle. This is the USB flash drive device just inserted, of course, the names of USB flash drives are different in different system environments;
Okay, now let's mount the USB flash drive device,
Input:
Mount-T vfat/dev/sdb1/mnt/USB
After the mounting is successful, let's check the files in the USB flash drive:
Ls-La/mnt/USB
Try to create a folder. Let's create a folder named my-files and then look at the folder of the USB flash drive:
Mkdir/mnt/USB/My-Files
We can see that the USB flash drive has an extra my-Files folder, indicating that the USB flash drive is mounted successfully and the folder is created successfully.
Write a file dir-out.txt into the my-files folder and check the content of the file:
DIR/>/mnt/USB/My-files/dir-out.txt
CAT/mnt/USB/My-files/dir-out.txt
After you complete the USB flash drive operation, we need to use umount to uninstall it. Note: Never unplug the USB flash drive directly. Otherwise, the USB flash drive may be damaged.
Umount/mnt/USB
After inserting the USB flash drive, the entire process of mounting the USB flash drive is completed. If anything is wrong or unreasonable, you are welcome to make an axe.