磁盘的挂载与卸载 mount umount

查看mount各个选项

[root@localhost ~]# mount

/dev/mapper/VolGroup-lv_root on / type ext4 (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

devpts on /dev/pts type devpts (rw,gid=5,mode=620)

tmpfs on /dev/shm type tmpfs (rw)

/dev/sda1 on /boot type ext4 (rw)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)


自动挂载配置文件/etc/fstab

[root@localhost ~]# mount -a


挂载/dev/sdb1磁盘分区到/mnt目录下

[root@localhost ~]# mount /dev/sdb1 /mnt


挂载磁盘分区也可以用分区标签label或UUID代替

例如:

[root@localhost ~]# mount LABEL=CPAN /mnt/

又如

[root@localhost ~]# blkid /dev/sdb1

/dev/sdb1: LABEL="CPAN" UUID="a2d14c10-c3e3-40c9-b290-45ed8ab50648" TYPE="ext4"

获取UUID

[root@localhost ~]# mount UUID=a2d14c10-c3e3-40c9-b290-45ed8ab50648 /mnt/

[root@localhost ~]# mount UUID="a2d14c10-c3e3-40c9-b290-45ed8ab50648" /mnt/


卸载

[root@localhost ~]# umount /mnt/

[root@localhost ~]# umount /dev/sdb1


你可能感兴趣的:(mount,umount,磁盘的挂载与卸载)