1: 在控制台状态下输入如下命令:
fdisk -l /dev/sd*
2: 在/mnt目录下建立一个挂装USB存储器的目录:
mkdir /mnt/udisk
3: 然后再运行装载设备命令,将USB设备挂装到/mnt/usb目录下:文件系统为FAT32
mount -t vfat /dev/sda1 /mnt/udisk
4: 运行如下命令即可查看USB存储器中的文件信息.
ls -l /mnt/udisk
Linux下卸载U盘命令如下:卸载U盘必须在不同的目录下进行卸载,也就是说不能在/mnt/udisk目录下进行卸载.卸载命令如下
cd /root
umount /mnt/udisk
如果显示device is busy,可以用如下命令进行卸载:
cd /rootfuser -km /mnt/udisk
umount /mnt/udisk
[root@localhost]# mkdir usd
[root@localhost]# ls
led-control usd
[root@localhost]# mount -t vfat /dev/sda4 /tmp/usd/
Unable to load NLS charset iso8859-1
FAT: IO charset iso8859-1 not found
mount: mounting /dev/sda4 on /tmp/usd/ failed: Invalid argument
mount U盘时候出现错误:
错误一:
$ mount -t vfat sda1 /mnt
Unable to load NLS charset cp437
FAT: codepage cp437 not found
mount: mounting sda1 on /mnt failed: Invalid argument
解答:
这是因为内核缺少cp437字符集. 所以需要重新配置内核!
在filesystems
-->native language support
-> 中选择Codepage 437和其他的一些常用的字符集即可.
错误二:
Unable to load NLS charset
iso8859-1 FAT: IO charset iso8859-1 not found
解答:
跟上边的出错原因是一样的,缺少该语种