您的位置:首页 > 运维架构 > Linux

Linux J2EE环境搭建 1、U盘/光盘挂载

2017-06-20 00:00 465 查看
U盘的挂载
1.插入U盘。
2.用fdisk -l查看磁盘信息
[root@localhost usb]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1012 8024467+ 83 Linux
/dev/sda3 1013 1044 257040 82 Linux swap

Disk /dev/sdb : 511 MB, 511558144 bytes
16 heads, 61 sectors/track, 1023 cylinders
Units = cylinders of 976 * 512 = 499712 bytes

上面红色显示的即为U盘。

3.在mnt目录下建一个usb目录(这个可随意)
[root@localhost mnt]# mkdir usb

4.挂载U盘
[root@localhost mnt]# mount /dev/sdb /mnt/usb/

5.进入/mnt/usb 即可看到U盘的内容了。
6.卸载U盘
[root@localhost usb]# umount -l /dev/sdb

光盘的挂载
与U盘相似。
1.插入光盘。

2.挂载光盘
[root@localhost mnt]# mount /dev/cdrom /mnt/cdrom/

3.卸载光盘
[root@localhost usb]# umount -l /dev/cdrom

4.弹出光盘
[root@localhost usb]# eject
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: