设备挂载以光驱为例,先在虚拟机VMware中光驱中添加镜像,确认光驱正常运行
[root@chenqj ~]# cd /dev/cdrom
-bash: cd: /dev/cdrom: 不是目录
[root@chenqj ~]# ls /dev/cdrom
/dev/cdrom
[root@chenqj ~]# mount /dev/cdrom /mnt (把cdrom挂载到mnt目录)
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@chenqj ~]# ls /mnt
CentOS_BuildTag GPL Packages RPM-GPG-KEY-CentOS-6 RPM-GPG-KEY-CentOS-Testing-6
EFI images RELEASE-NOTES-en-US.html RPM-GPG-KEY-CentOS-Debug-6 TRANS.TBL
EULA isolinux repodata RPM-GPG-KEY-CentOS-Security-6
[root@chenqj /]# cat /etc/fstab (系统挂载配置文件)
#
# /etc/fstab
# Created by anaconda on Sat Sep 23 00:10:04 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=074813f8-47c3-441f-8788-bf17e461403c / ext4 defaults 1 1
UUID=733288b5-d2f0-4562-9ef1-7efe331f886a /boot ext4 defaults 1 2
UUID=4485a880-091c-4c0b-ae4d-f28dac032138 swap swap defaults 0 0
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
[root@chenqj ~]# df -h (系统目前目录挂载信息)
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 8.8G 701M 7.7G 9% /
tmpfs 491M 0 491M 0% /dev/shm
/dev/sda1 190M 27M 154M 15% /boot
/dev/sr0 3.7G 3.7G 0 100% /mnt
[root@chenqj ~]# cd /mnt
[root@chenqj mnt]# cd Packages/ (系统默认挂载位置)
[root@chenqj Packages]# ls (查看神仙信息)
本文出自 “chenqj” 博客,谢绝转载!
原文地址:http://chenqj.blog.51cto.com/13330293/1970160