You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
660 B
Markdown
42 lines
660 B
Markdown
# 虚拟机和宿主机目录共享
|
|
|
|
## 创建用户
|
|
WIN + X
|
|
G
|
|
计算机管理(本地) > 本地用户和组 > 用户 > 新用户
|
|
用户名: ubuntu
|
|
密码 : 123456
|
|
|
|
取消勾选 用户下次登录时须更改密码
|
|
|
|
## 文件夹共享
|
|
选择要共享的文件夹 > 鼠标右键 > 共享 > 搜索用户
|
|
输入: ubuntu
|
|
选择用户 ubuntu > 添加
|
|
修改权限 读取/写入
|
|
点击共享按钮
|
|
|
|
## 磁盘挂载
|
|
|
|
创建挂载目录
|
|
```shell
|
|
mkdir /workspace
|
|
```
|
|
|
|
执行挂载命令
|
|
```shell
|
|
HOST_IP=192.168.0.99
|
|
HOST_MNT_DIR=workspace
|
|
VM_MNT_DIR=/workspace
|
|
|
|
mount -o \
|
|
username=ubuntu,password=123456 \
|
|
//${HOST_IP}/${HOST_MNT_DIR} \
|
|
${VM_MNT_DIR}
|
|
|
|
```
|
|
|
|
|
|
|
|
|