How to use USB flash drives in LinuxRedHat9.0

Source: Internet
Author: User
Article Title: how to use a USB flash drive under LinuxRedHat9.0. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

# How to use USB flash drives in fdisk Red Hat 9.0

Check that the USB flash drive is the device, and mount-t vfat/dev/to find the disk/your directory.

  I

Linux, unlike Windows, can be automatically identified after new hardware is connected. in Linux, new hardware cannot be automatically identified and must be manually identified. USB mobile storage devices are generally identified as sda1, which can be queried by the fdisk-l command.

Before using a USB flash drive, we need to create a new sub-directory for the external mount point. Generally, the subdirectories of the external mount point are created in/mnt, and we also created there, of course, you can also create a directory in the/directory and set the name by yourself. We will name it usb. The command under the terminal is as follows:

Mkdir/mnt/usb

Then we can connect to my USB flash drive, and then Enter the command at the terminal and press Enter:

Mount/dev/sda1/mnt/usb

In Windows, when the USB flash drive is used up, we need to delete it before removing the USB flash drive. in Linux, we also need to delete the mount point by using the following methods:

Umount/dev/sda1/mnt/usb or umount/dev/sda1

If you do not detach a USB flash drive to umount, data may be lost.

  II

Plug in your USB flash drive, open the system terminal, and see if you have recognized it.

# Lsusb

If you recognize it, you will see a usb device or something.

Go to the mnt directory.

# Cd/mnt

Create a directory, such as USB disk

# Mkdir USB disk

Run the following command:

# Mount-t vfat-o iocharset = cp936/dev/sda1/mnt/usbdiak

(This is in a row.-t and-o are two parameters, and sda1 is your drive letter)

In this way, go to the/mnt/usbdisk directory to see if there is anything.

To uninstall

# Umount/dev/sda1

You can.

  3.

Basically, no configuration is required.

It is used in the same way as in windows.

The difference is that you need to mount it in linux.

Here we first create a directory to mount the usb flash drive to this directory: mkdir/mnt/usb

  Thu

Red hat linux9 how to use USB flash drives in GNOME desktop environments

Solution 1:

Linux, unlike Windows, can be automatically identified after new hardware is connected. in Linux, new hardware cannot be automatically identified and must be manually identified. USB mobile storage devices are generally identified as sda1, which can be queried by the fdisk-l command.

Before using a USB flash drive, we need to create a new sub-directory for the external mount point. Generally, the subdirectories of the external mount point are created in/mnt, and we also created there, of course, you can also create a directory in the/directory and set the name by yourself. We will name it usb. The command under the terminal is as follows:

Mkdir/mnt/usb

Then we can connect to my USB flash drive, and then Enter the command at the terminal and press Enter:

Mount/dev/sda1/mnt/usb

In Windows, when the USB flash drive is used up, we need to delete it before removing the USB flash drive. in Linux, we also need to delete the mount point by using the following methods:

Umount/dev/sda1/mnt/usb or umount/dev/sda1

If you do not detach the USB flash drive to umount, it will easily cause data loss.

Solution 2:

The key to USB support lies in the driver. When there is no driver device, the mount execution is definitely not successful. The general method for using USB flash drives in Red Hat is as follows.

1. Do not insert a usb flash drive. Check whether usb-storage exists in/sbin/lsmod. If not:

Cd/lib/modules/2.4.20-8/kernel/drivers/usb

For v in *. o storage/*. o; do/sbin/insmod $ v; done

2. Here/sbin/lsmod should include usb core, usb-ohci (or usb-uhci, depending on the Motherboard chipset), usb-storage, scsi_mod, etc. The usb-storage status should be

(Unused ).

3. Insert a usb flash drive without stopping/sbin/lsmod. During this period, the usb-storage status should be Initializing, which lasts for about half a minute. In fact, it is equivalent to a Windows auto ball without stopping in the lower right corner :)

4. After initialization,/sbin/fdisk-l should be able to see the/dev/sda1 device. Then, execute

Mount/dev/sda1/mnt/udisk. If you want to see Chinese characters again in MSDOS format, you can

Mount-t vfat/dev/sda1/mnt/udisk-o iocharset = gb2312.

(For convenience, add a line to/etc/fstab, And then mount/mnt/udisk ).

5. It is strange that sometimes fdisk cannot see sda1, but it can also be mounted.

After you use the above steps to mount a USB flash drive, it is basically. Desktops, laptops, and VMware are all the same.

Mkdir/mnt/usb

Mount/dev/sda1/mnt/usb

Linux installation on a laptop is the same as that on a desktop

Ps:

First, check lsmod | grep usb-storage. This is a module that supports USB. If not, you cannot operate the USB interface.

If not, you can use modprobe usb-storage. Generally, you can use fdisk-l to view the device name of the hardware.

It is much more accurate than the hardware name.

In this way, a folder named usb is created under mnt.

Mount-t-vfat/dev/sda1/mnt/usb

The above statement mounts the usb flash drive to the usb folder. -T-vfat is the partition format of your USB flash drive.

  V.

Mount is the command to mount the usb, but the object to be mounted is not written correctly. And the Mount object does not exist.

The correct method is as follows:

After usb

Use the disk-l command to check the name of your usb device. The fat format in the list contains the name of your usb device, which may be sda1 or sda2.

If it is sda1

Mount-t vfat/dev/sda1 (note that your usb is in the linux device name)/mnt/

You can.

Then go to the mnt directory and enter your usb 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.