How to mount and detach a USB flash drive in Linux

Source: Internet
Author: User

All users who have used Linux know that Linux does not adopt user-friendly management like windows. For example, if you want to use a USB flash drive and plug it in, you will find that we can't see anything at all, including the lower right corner of the page and it will not show new hardware like windows, this is exactly one of the differences between windows and windows.
Next, let's take a look at how to mount and detach a USB flash drive in Linux. Please be careful when possible.
1. First, start the VM. Remember to enter the Linux interface as an administrator. The default user name is "root" and the password is "OK.
(There are many good tutorials on how to build your own virtual machine. Let's take a look .)
2. Because we want to mount the mount point, let's take a look at the Mount point first.
For details, refer to "Red Hat"-"System Tools"-"Hardware Browser" and find "Hard Drive ".
Note: check if the USB flash drive is not inserted. After entering Linux, insert the USB flash disk and re-open the hard drive. The following figure shows the name of sdb1, which is the mount point, remember it first.
3. Let's take a look at the shell commands that are specially mounted:
Mount [Option] [device name] [Directory]
Note:
There are two options:
-T mount the specified file system type.
-R mounts the file system in read-only mode. The default mode is read/write.
Now let's start with the question:
1. Click "create terminal" on the right ". This is very important because most of our subsequent commands are executed here.
2. Insert a USB flash drive.
3. Enter the code:
Mount:
Mkdir/mnt/USB
Mount-T vfat/dev/sdb1/mnt/USB
Ls/mnt/USB: view the files in/mnt/USB.
Now we can see that 1.txtand 2.txt 97 are all items in the USB flash disk.
Okay. Now let's see
Uninstall:
Note that you must go back to the root folder. The reason is very simple. When you are in a folder, you must return it before deleting it.
We are now in the root folder, so simply enter the command. Back to the top-level directory and type CD.
Umount/dev/sdb1
Ls/mnt/USB
When I checked it again, it was uninstalled, so I couldn't see anything.
As we mentioned above, we only talked about how to mount a USB flash drive, and how to mount a floppy disk and a CD. You can try it yourself and I will not do it here.
Below I will also introduce the code for mounting a floppy disk and a CD by the way:
CD mounting:
Ls/mnt/CDROM
Mount-T iso9660/dev/CDROM/mnt/CDROM
Ls/mnt/CDROM
Unload a CD:
Umount/mnt/CDROM
Ls/mnt/CDROM
Floppy Disk mounting:
Ls/mnt/floppy
Mount-T Auto/dev/fa0/mnt/floppy
Ls/mnt/floppy
Detach a floppy disk:
Umount/dev/fd0
Ls/mnt/floppy

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.