Windows系统下使用VirtualBox安装Ubuntu系统
一、安装准备
1.VirrualBox
1.1下载
官网地址:https://www.virtualbox.org/wiki/Downloads
(现在已经更新到6.1.18版本)
Windows操作系统,选择第一个。

1.2下载后,打开安装包开始安装。

1.3点击“下一步”安装,选择安装的功能不必更改;安装位置我改在D盘了。

个人不喜欢桌面有太多图标,所以不保留快捷方式。点“下一步”继续安装。

安装过程会暂时中断网络连接,选“是”继续。

确认安装。

很快就安装好啦。

2.Ubuntu
(现在更新到 20.04.2.0 LTS版本了,但是我选择的是更稳定的18.04版本)
2.1下载
官网下载:http://releases.ubuntu.com/18.04/
清华大学镜像下载:https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
2.2选择第二个,非图像桌面的服务版本Sever install image ISO镜像。

2.3下载完毕。

二、创建虚拟硬盘
步骤如下:
打开VB -> 新建 -> 类型选择Linux -> 内存建议设置2G -> 现在创建虚拟硬盘 -> VDI -> 固定大小 -> 文件位置和大小不作更改 -> 创建

创建完毕,进行设置。
①存储 -> 属性 -> 选择下载的iso

②网络 -> 连接方式 -> 桥接网卡 -> 界面名称 -> RPCFC

启动虚拟机。


选择语言English -> Enter

cmd查看本机ip设置:ipconfig /all

设置



三、连接网络
3.1修改网络地址
vim /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled}
network:
ethernets:
enp0s3:
addresses:
- 192.168.0.119/24
gateway4: 192.168.3.1 nameservers:
addresses:
- 218.85.157.99
version: 2
# 应用网络配置
netplan apply
# 直接重启
reboot
# 查看 IP 地址(需安装 net tools) ifconfig
# 另外一个查看 IP 地址的命令
ip a
3.2验证虚拟机能不能成功联网
ping www.baidu.com
死活ping不上,今晚先睡了。

浙公网安备 33010602011771号