Mount a USB flash drive to CentOS and a USB flash drive to CentOS

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.