Mounting a USB flash disk in linux

Source: Internet
Author: User
Mount a USB flash disk in linux-general Linux technology-Linux technology and application information. For details, refer to the following section. 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 the Administrator, enter su root, and then enter the administrator password for password authentication;



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/0805222152.16.jpg'); ">

Create a folder named USB under/mnt. The folder name is mkdir/mnt/USB.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/080522215905.jpg'); ">

Then enter: fdisk? L check the disk partition information:



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/080522215941.jpg'); ">

Then insert the USB flash drive into the USB interface of the computer and enter: fdisk? L

Check the disk partition changes. We can see an additional/dev/sdb1

Partition, which is the USB flash drive device just inserted. Of course, the name of the USB flash drive device displayed in different system environments is different;



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/080522220022.jpg'); ">

Okay, now let's mount the USB flash drive device. Input: mount? T vfat/dev/sdb1/mnt/USB



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/080522220102.jpg'); ">

After the mounting is successful, let's check the file ls in the USB flash drive? La/mnt/USB



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/080522220130.jpg'); ">

Create a folder and try it. Let's create a folder named my-files, and then look at the folder of the USB flash drive: mkdir/mnt/USB/my-files.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/080522220206.jpg'); ">

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



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/0805221636.jpg'); ">

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



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/080522220439.jpg'); ">

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.

Author: laolinux
From: laolinux.cublog.cn
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.