linux mount挂载U盘,磁盘

查看磁盘,找到自己的U盘

[root@localhost ~]# fdisk -l
磁盘 /dev/sdb:31.0 GB, 31037849600 字节,60620800 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:gpt
Disk identifier: B65F87D4-E0CB-4F38-B561-9CCC0743AEC9


#         Start          End    Size  Type            Name
 1         2048     60555223   28.9G  Microsoft basic Ventoy
 2     60555224     60620759     32M  Microsoft basic VTOYEFI


[root@localhost ~]# ls /dev/sdb*
/dev/sdb  /dev/sdb1  /dev/sdb2

挂载

[root@localhost ~]# mkdir /mnt/usb
[root@localhost ~]# mount  /dev/sdb1 /mnt/usb
mount: 未知的文件系统类型“exfat”

查看系统支持的格式

[root@localhost ~]# man mount
       -t, --types vfstype
              The  argument  following  the  -t  is  used  to  indicate the filesystem type.  The filesystem types which are currently supported include: adfs, affs, autofs, cifs, coda, coherent, cramfs,
              debugfs, devpts, efs, ext, ext2, ext3, ext4, hfs, hfsplus, hpfs, iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs, proc, qnx4, ramfs, reiserfs, romfs, squashfs, smbfs, sysv, tmpfs, ubifs,
              udf,  ufs,  umsdos,  usbfs,  vfat,  xenix,  xfs, xiafs.  Note that coherent, sysv and xenix are equivalent and that xenix and coherent will be removed at some point in the future — use sysv
              instead. Since kernel version 2.1.21 the types ext and xiafs do not exist anymore. Earlier, usbfs was known as usbdevfs.  Note, the real list of all supported filesystems  depends  on  your
              kernel.

U盘分区格式解读:https://blog.csdn.net/weixin_42669785/article/details/107100918

 

解决

exFAT软件包在CentOS 7核心存储库中不可用。可以选择从源代码构建exFAT工具,也可以启用Nux Dextop存储库,然后使用yum进行安装。这里是第二种。
Nux存储库依赖于EPEL软件存储库。如果系统上未启用EPEL存储库,输入以下内容来启用:

sudo yum install epel-release
接下来,导入存储库GPG密钥并通过安装rpm软件包启用Nux存储库:

sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
启用存储库后,使用以下命令安装exfat-fuse和exfat-utils软件包:


sudo yum install exfat-utils fuse-exfat ntfs-3g

lsblk
# 挂载 U 盘
mount.exfat  /dev/sdb1 /mnt/usb
# 挂载移动硬盘
mount -t ntfs /dev/sdb1 /sdb/

 

posted @ 2023-02-17 16:26  linyouyi  阅读(421)  评论(0编辑  收藏  举报