在 CentOS 中挂载 ISO 文件一般步骤如下:
mkdir -p /mnt/iso
mount -o loop /path/to/file.iso /mnt/iso
例如:
mount -o loop /root/CentOS-7-x86_64-DVD.iso /mnt/iso
df -h
或
ls /mnt/iso
编辑 /etc/fstab,添加一行:
/path/to/file.iso /mnt/iso iso9660 loop 0 0
umount /mnt/iso
mount: command not foundsudo如果你是 CentOS 8 / Stream 或想用 ISO 做 yum 本地源,也可以告诉我,我可以给你具体配置方法。