How to mount/uninstall USB devices using commands under Linux

  
                

Linux devices usually mount USB devices automatically. If you do not mount them automatically, you need to manually mount the USB devices. How do you mount USB devices under Linux? How to uninstall when you don't need it? Let's get to know it.

is determined by the following three kinds of information device names

1, the object to mount the file system type

2, the object to be mounted before mounting the

3, determine the mount point

Mount the mount command:

Format: mount [-parameter] [device name] [mount point]

Our common USB device formats are: FAT32 format, NFTS format, etc.

ext2 linux currently used file system

msdos MS-DOS fat, is fat16

vfat windows98 commonly used fat32

nfs network file system < Br>

iso9660 CD-ROM disc standard file system

ntfs windows NT 2000 file system

hpfs OS/2 file system

Before running u disk, run Command cat /proc/partitions to see which partitions are in the system.

After plugging in the u disk, run the above command again to see what partitions are available.

1) Insert the USB flash drive

2) Enter fdisk -l /dev/sda to view the output, for example, my:

The code is as follows:

# fdisk -l /dev/sda"/p" Disk /dev/sda: 131 MB, 131104768 bytes

3 heads, 32 sectors/track, 2667 cylinders

Units = Cylinders of 96 * 512 = 49152 bytes

Device Boot Start End Blocks Id System

/dev/sdb1 * 1 2668 128016 6 FAT16

3) Read the output above I know the device where the U disk is located, for example, I am /dev/sdb1, and then it is mounted

Suppose I mount the USB disk to the /mnt/usb directory (if not, new) Is mount -t msdos /dev/sdb1 /mnt/usb

If it is fat32

The code is as follows:

mount -t vfat /dev/sdb1 /mnt/usb

If it is ext2 format, use the command:

The code is as follows:

mount -t ext2 /dev/sda1 /mnt/usb

4) Open /mnt/usb and you can see it in your USB flash drive. The West!

The code is as follows:

cd /mnt/usb

5) The uninstall command is:

The code is as follows:

umount /Mnt/usb.

The above is the method of mounting and uninstalling USB devices under Linux. After mounting the USB interface device, you can view the contents of the mobile disk, and you can uninstall it without using it. You learn Yet?

Copyright © Windows knowledge All Rights Reserved