Linux系统下如何挂载FAT32的U盘

作者: 字体:[增加 减小] 类型:转载 时间:2013-04-02
Linux挂载U盘步骤如下: 1:将U盘插入USB接口,检查是否插好 2:用fdisk命令检查分区和USB设备信息
id="cproIframe_u2298924_2" width="650" height="200" src="http://pos.baidu.com/acom?adn=3&adp=1&at=0&aurl=&c01=1&cad=1&ccd=24&cec=GBK&cfv=18&ch=0&col=zh-CN&conBW=0&conOP=1&cpa=1&cpro_lu=1%2C%23dfe4f9%2C%23000000%2C%E5%AE%8B%E4%BD%93&dai=2&dis=0&layout_filter=image&ltr=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DGAjOS0FfE6-qYZX-nIvpkNs9DmuiVk2_lwbN4uUv79d9SOHccdCjHY2kQa-0CEjD%26wd%3D%26eqid%3Dd0df159a00002dc900000003564d40bd&ltu=http%3A%2F%2Fwww.jb51.net%2Farticle%2F35225.htm&lu_161=0&lunum=6&n=jb51_cpr&pat=1&pcs=1583x1031&pih=80&pis=10000x10000&piw=130&ps=491x326&psr=1600x1200&pss=1583x492&ptbg=90&ptp=0&ptt=0&qn=e6ab1a1d73b1854d&rad=&rsi0=650&rsi1=200&rsi5=4&rss0=%23FFFFFF&rss1=%23FFFFFF&rss2=%23000000&rss3=%23444444&rss4=%23008000&rss5=&rss6=%23e10900&rss7=&scale=&skin=tabcloud_skin_5&stid=5&td_id=2298924&tft=0&titFF=%25E5%25BE%25AE%25E8%25BD%25AF%25E9%259B%2585%25E9%25BB%2591&titFS=14&titSU=0&titTA=left&tlt=0&tn=baiduCustNativeAD&tpr=1447903420434&ts=1&version=2.0&xuanting=0&dtm=BAIDU_DUP2_SETJSONADSLOT&dc=2&di=u2298924&ti=Linux%E7%B3%BB%E7%BB%9F%E4%B8%8B%E5%A6%82%E4%BD%95%E6%8C%82%E8%BD%BDFAT32%E7%9A%84U%E7%9B%98_Linux%2Fapache_%E8%84%9A%E6%9C%AC%E4%B9%8B%E5%AE%B6&tt=1447903420418.172.231.232" align="center,center" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" allowtransparency="true">

Linux挂载U盘步骤如下

1:将U盘插入USB接口,检查是否插好

2:用fdisk命令检查分区和USB设备信息

[root@wgods ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 121601 976655610 8e Linux LVM

Disk /dev/sdb: 4012 MB, 4012900352 bytes
223 heads, 55 sectors/track, 639 cylinders
Units = cylinders of 12265 * 512 = 6279680 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(42, 17, 40) logical=(55, 23, 1)
Partition 1 has different physical/logical endings:
phys=(487, 222, 55) logical=(639, 6, 31)

通过上面信息我们可以看出USB设备是FAT32格式的,标识为/dev/sdb1

[root@wgods ~]# fdisk -l | grep FAT32
/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)

3:在mnt目录下先建立一个usb的目录

[root@wgods ~]# cd /mnt/
[root@wgods mnt]# mkdir usb

4:挂载U盘
[root@wgods mnt]# mount -t vfat /dev/sdb1 /mnt/usb

挂载成功后,我们可以在/mount/usb下看到相关的内容。

5:卸载U盘

执行umount命令卸载U盘时,报如下错误“device is busy”,可以用参数l解决问题。当然你也可以用fuser命令解决问题。如下所示

[root@wgods ~]# umount /mnt/usb
umount: /mnt/usb: device is busy
umount: /mnt/usb: device is busy

[root@wgods ~]# umount -f /mnt/usb
umount2: Device or resource busy
umount: /mnt/usb: device is busy
umount2: Device or resource busy
umount: /mnt/usb: device is busy

[root@wgods ~]# umount -l /mnt/usb

问题解决

---------------------------------------------------------------------------------

[root@wgods usb]# umount /mnt/usb
umount: /mnt/usb: device is busy
umount: /mnt/usb: device is busy
[root@wgods usb]# fuser -m /mnt/usb
/mnt/usb: 21123c 21158c 21180c 21182c 21223c
[root@wgods usb]# ps -auxw | grep 21123
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 21123 0.0 0.0 3784 672 pts/2 T 15:10 0:00 more 12.sql
root 21346 0.0 0.0 3920 696 pts/2 S+ 15:52 0:00 grep 21123

[root@wgods usb]# fuser -kvm /mnt/usb

USER PID ACCESS COMMAND
/mnt/usb: root 21123 f.c.. more
root 21158 ..c.. man
root 21180 ..c.. sh
root 21182 ..c.. less
root 21223 ..c.. bash

[etl@wgods ~]$ umount /mnt/usb
umount: /mnt/usb is not in the fstab (and you are not root)
[etl@wgods ~]$ su - root
Password:
[root@wgods ~]# umount /mnt/usb

6: 删除usb目录
[root@wgods ~]# umount -l /mnt/usb
[root@wgods ~]# rm -rf /mnt/usb

注意:有时候挂载时,中文的文件名和目录名会出现乱码,为了避免这种情况可以指定字符集,命令如下

[root@wgods ~]# mount -t vfat -o iocharset=utf8,codepage=uft8 /dev/sdb1 /mnt/usb

[root@wgods ~]# mount -t vfat -o iocharset=cp936,codepage=936 /dev/sdb1 /mnt/usb

注意:cp936是指简体中文,cp950是指繁体中文。

Linux系统下如何挂载FAT32的U盘相关推荐

  1. linux刷新挂载信息,Linux系统下如何挂载FAT32的U盘

    Linux挂载U盘步骤如下 1:将U盘插入USB接口,检查是否插好 2:用fdisk命令检查分区和USB设备信息 [root@wgods ~]# fdisk -l Disk /dev/sda: 100 ...

  2. linux服务器u盘挂载,Linux系统下如何挂载FAT32的U盘

    Linux挂载U盘步骤如下 1:将U盘插入USB接口,检查是否插好 2:用fdisk命令检查分区和USB设备信息 [root@wgods ~]# fdisk -l Disk /dev/sda: 100 ...

  3. linux系统查看sd卡格式ft32,Linux系统下如何挂载FAT32格式U盘

    Linux挂载U盘步骤如下: 1:将U盘插入USB接口,检查是否插好 2:用fdisk命令检查分区和USB设备信息 [root@wgods ~]# fdisk -l Disk /dev/sda: 10 ...

  4. linux系统下如何挂载NTFS移动硬盘

    linux系统下如何挂载NTFS移动硬盘 在使用 Linux 时我们经常会遇到无法读取硬盘的情况,这是因为 Linux 下支持的文件系统跟 Windows 下的有所差异, Linux 默认是不支持 N ...

  5. linux下挂载优盘脚本,一种linux系统下自动挂载U盘的方法与流程

    技术领域 本发明涉及服务器维护技术领域,尤其涉及一种linux系统下自动挂载U盘的方法. 背景技术: 不管是测试服务器的维护,还是用户使用的服务器,在维护.更新.使用过程中,需要使用U盘向服务器拷贝文 ...

  6. linux 挂在u盘变成只读,linux系统下优盘挂载之文件系统后只读解决方法

    问题:有时在linux系统下挂载优盘之后,优盘文件系统只读,表现形式一般为:删除文件或者创建文件的时候提示无法删除或创建文件:文件系统只读;解决方法:1.在Linux系 问题:有时在linux系统下挂 ...

  7. linux中挂载1t硬盘,Linux系统下硬盘挂载详细说明

    情况一:知道windows文件系统格式,和windows个盘对应/dev/下的sda* 文件时,只需要添加 /dev/sda* /media/"新建的文件夹名" "文件系 ...

  8. Linux系统下用Ventoy制作Windows启动盘

    Ubuntu 18.04 制作Windows10企业版启动盘(U盘) 概要 ubuntu18.04,ros对应的是melodic版本.转回Windows下使用Robot Studio时,由于系统use ...

  9. Linux系统下的硬盘分区、格式化与挂载

    以下内容源于网络资源的学习与整理,如有侵权请告知删除. 参考内容 分区是什么意思_360问答 磁盘分区_360百科 挂载_360百科 fdisk对一个块设备进行分区_XZY028的博客-CSDN博客_ ...

最新文章

  1. OpenCV特征检测
  2. rank()over 函数的使用
  3. 带有骆驼,ActiveMQ,Elasticsearch的HL7关键用例
  4. 数据结构实验之图论七:驴友计划
  5. v-if v-show区别(面试题)
  6. java json u0026_特殊字符的json序列化
  7. ie浏览器如何实现scrollto_如何实现报表直接打印需求
  8. Job for slapd.service failed because the control process exited with error code. See systemctl stat
  9. 关于单细胞批次矫正那些事(二) KBET 用于单细胞批次矫正结果的评估
  10. [SPLEB]CodeSmith原理剖析(2)
  11. Web版的各种聊天工具
  12. 统计小写英文字母的个数 c语言,输入一行字符,统计英文字母,空格,和其他字符的个数...
  13. Docker 连接宿主 Redis
  14. 5 位改变世界的女性程序员
  15. 使用bash解析xml
  16. git gc error: failed to run repack message
  17. 如何在谷歌浏览器内设置http代理?
  18. android 图片占用内存的计算
  19. Linux修改主机名
  20. 板书比赛计算机,清华老师们的板书惊艳朋友圈!8个板书技巧让黑板亮起来!...

热门文章

  1. ielts speaking questions
  2. 2021的第一个offer来自mbzuai
  3. 没有理论支持的文章令人窒息
  4. python练习程序(批量重命名)
  5. leetcode 225 用队列实现栈(JS)
  6. [转]jQuery选择器总结
  7. eclipse整体替换
  8. XCode: 兼容ARC和non-ARC
  9. DNS服务搭建和正反区域解析
  10. Android APK文件学习调研