Linux:挂载iso镜像

1、临时挂载

# mount -o loop /data1/CentOS-6.8-x86_64-bin-DVD1.iso /media/centos-dvd1
# mount -o loop -t iso9660 /data1/CentOS-6.8-x86_64-bin-DVD1.iso /media/centos-dvd1

# umount /media/centos-dvd1

2、永久挂载 

[root@nk0 nk-deploy]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Feb 23 07:28:22 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=3d083579-f5d9-4df5-9347-8d27925805d4 /                       ext4    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/datavg/data	/data1			ext4	defaults	0 0
/data1/software/CentOS-6.8-x86_64-bin-DVD1.iso /media/centos-dvd1 iso9660 defaults,loop 0 0
# mount -a
# df -h

 

你可能感兴趣的:(Linux基础)