Mounting a USB flash disk in Linux

Source: Internet
Author: User
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.

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.