Mount a USB flash drive to CentOS and a USB flash drive to CentOS
USB flash drive insertion prompt:
[Sdb] No Caching mode page present
[Sdb] Assuming drive cache: write through
Use fdisk-l to check the USB flash disk (in fact, this is useless, just look at it)
The following are the operations (only two steps are required ):
1. Go to the dev directory and check the device name of your USB flash drive. My name is sdb.
2. mount: mount-t vfat/dev/sdb/mnt/udisk
Note: For a fat-format USB flash drive, run the mount-t vfat/dev/sdb/mnt/udisk command.
For ntfs format USB flash drive, mount command: mount-t ntfs-3g/dev/sdb/mnt/udisk
If there is no/mnt/udisk folder, you can create
Mkdir/mnt/udisk
You can ~
However, ntfs format to mount, You need to download a ntfs-3g-2011.4.12-5.el5.i386.rpm package, install ~
Baidu click this package name, go to CSDN download...
How can I mount a USB flash drive to centos, copy files in it, and install files in the USB flash drive?
Mount/dev/sdb/mnt
Cd/mnt
Cp the directory or file to be copied/opt (Note: opt is the target directory)
Wu Chaoyang [authoritative expert]
Automatic mounting of USB flash drives in linux text mode
Start the terminal and enter the following command:
Run the fdisk-l command to view the mounted module devices before inserting the USB flash drive.
After the USB flash drive is inserted, use fdisk-l again. In this case, the extra module is your USB flash drive.
Run the following command to mount your usb flash drive to/mnt/usb. Of course, you can also mount it to another directory:
Cd/mnt
Mkdir usb
Mount-t vfat/dev/sdb */mnt/usb
Now, go to/mnt/usb to see what is in your usb flash drive.
To enable automatic mounting, you can write a shell script and use the above command to set it to run at startup.
I think this is also a method. You can search for some information on the Internet for the specific shell script content.