In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to mount a USB disk in linux. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
After inserting the flash drive, generally follow the following steps:
1.fdisk-l / dev/sd*
Fdisk-l lists the partition table information for the specified device. Because the USB disk is simulated as scsi device access, it is automatically named sd*.
Usually this step can find the flash drive, if the flash drive has a light will also be lit, indicating that it has been found.
two。 If there is no response to the execution of the previous command, or if some information display modules are not added
You can lsmod to see if there is a usb-storage scsi_mod sd_mod module.
Add missing modules without modprobe [module].
Then try again. Just ok.
3. Finally, you need to mount the USB disk. Here, you need to create a usb directory under the mnt directory.
Mount / dev/sda / mnt/usb
Some systems need to specify the type of file system, and you can use the
Mount-t vfat / dev/sda / mnt/usb
Let's look at an example:
1: enter the following command in the console state:
Fdisk-l / dev/sd*
If you have more than one USB device, the device name is represented under Linux as sda, sdb, sdc, and so on. After running the above command, the following information is returned on the computer, indicating that the system has found the USB device, the device name is / dev/sda1, bootable (the * under Boot indicates the active partition), the capacity 128MB, and the file system FAT16.
Disk / dev/sda: 131 MB, 131072000 bytes
50 heads, 32 sectors/track, 160 cylinders
Units = cylinders of 1600 * 512 = 819200 bytes
Device Boot Start End Blocks Id System
/ dev/sda1 * 1 160 127984 6 FAT16
2: create a directory where USB storage is mounted under the / mnt directory:
Mkdir / mnt/udisk
3: then run the mount device command to mount the USB device to the / mnt/usb directory: the file system is FAT32
Mount-t vfat / dev/sda1 / mnt/udisk
Or if it is in another file format, such as FAT16
Mount-t msdos / dev/sda1 / mnt/udisk
In order to display the possible Chinese fonts correctly, set the input and output character type to cp936.
Mount-t vfat-o iocharset=cp936 / dev/sda1 / mnt/udisk
[it is true that the font display of redhat9 is not as good as that of windows, and it is all due to Chinese support. This is mainly due to the fact that mount does not use the iocharset parameter when mounting partitions, not because linux supports Chinese.
For example, mount-t vfat-o iocharset=cp936 / dev/sda1 / mnt/usb can also use gb2312 character set codes:
Mount-t vfat-o iocharset=gb2312 / dev/sda1 / mnt/usb
Mount-t ntfs-o iocharset=cp936 / dev/sda1 / mnt/usb
Mount-t msdos-o iocharset=gb2312 / dev/sda1 / mnt/usb]
Give it a try. If not, change / dev/sda1 to / dev/sda.
4: run the following command to view the file information in USB memory.
Ls-l / mnt/udisk
The command to uninstall the USB disk under Linux is as follows:
Uninstall the USB drive must be uninstalled in a different directory, that is, it cannot be uninstalled in the / mnt/udisk directory. The uninstall command is as follows
Change cd / root to the root directory
Umount / mnt/udisk
If device is busy is displayed, you can uninstall it with the following command:
Cd / root
Fuser-km / mnt/udisk
Umount / mnt/udisk
After reading the above, do you have any further understanding of how to mount a USB disk in linux? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.