码迷,mamicode.com
首页 > 系统相关 > 详细

如何将U盘内文件拷入VMware Linux CentOS6.5虚拟机

时间:2016-07-07 00:47:49      阅读:320      评论:0      收藏:0      [点我收藏+]

标签:

之前在Linux CentOS下安装Oracle这篇随笔中我提到要将下载到的安装文件解压缩

那么,问题来了!

如何把下载到的文件拷入虚拟机中呢?

我是这样做的:

1、将下载到的文件拷入U盘

2、以root用户身份,使用fdisk -l命令查询当前所有分区:

[root@localhost ~]# fdisk -l

Disk /dev/sda: 42.9 GB, 42949672960 bytes255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

 Device Boot Start End Blocks Id System

/dev/sda1 * 1 38 305203+ 83 Linux
/dev/sda2 39 4964 39568095 83 Linux
/dev/sda3 4965 5221 2064352+ 82 Linux swap / Solaris
[root@localhost ~]# 

 

3、插入U盘,再使用fdisk -l命令:

[root@localhost ~]# fdisk -l

Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 38 305203+ 83 Linux
/dev/sda2 39 4964 39568095 83 Linux
/dev/sda3 4965 5221 2064352+ 82 Linux swap / Solaris

Disk /dev/sdb: 7948 MB, 7948206080 bytes
81 heads, 10 sectors/track, 19165 cylinders
Units = cylinders of 810 * 512 = 414720 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 11 19166 7757824 b W95 FAT32

 

 然后就可以看到多了一个分区:Disk /dev/sdb,这个就是刚刚插入的U盘啦。

4、创建一个目录,使用mount命令将U盘挂载到该目录下:

首先,在/mnt下创建一个usb目录:

[root@localhost ~]#mkdir /mnt/usb

使用mount命令将U盘挂载到usb目录:

[root@localhost ~]#mount /dev/sdb /mnt/usb

 

 5、最后就可以使用cp命令将U盘里的文件拷到虚拟机里啦~

如何将U盘内文件拷入VMware Linux CentOS6.5虚拟机

标签:

原文地址:http://www.cnblogs.com/ivychang/p/5648045.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!