目录
一、安装 Vmware虚拟机
二、安装 Ubuntu镜像
三、安装 open-vm-tools
① open-vm-tools,这个装上之后虚机就有显示驱动了,实现主机和虚拟机之间的复制粘贴,且屏幕可以自适应大小。
sudo apt install open-vm-tools-desktop
注:若不需要 open-vm-tools 了,执行此命令进行卸载 sudo apt autoremove open-vm-tools
② 重启虚拟机
sudo reboot
四、Ubuntu 换源
方法一:设置中换源(推荐)
① 打开【设置】,找到【软件与更新】
②在【Ubuntu软件】,打开【下载自】,选择【其他...】,选择下图服务器
方法二:文件中换源(不推荐)
① 备份 /etc/apt/sources.list 文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
② 打开文件 /etc/apt/sources.list
sudo gedit /etc/apt/sources.list
③ 更换源
#阿里云源:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
#清华源:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
五、安装必要工具
① 更新与升级
sudo apt update
sudo apt upgrade
② 安装工具
sudo apt install vim
sudo apt install gcc
六、疑难问题
1、设置共享文件后,Ubuntu不显示文件夹
① 安装依赖包
sudo apt-get install open-vm-tools-dkms
② 启动共享文件夹
默认路径 /mnt/hgfs ,提示没有 /hgfs 文件夹的自己创建。
sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
③ 如果报错:if you are sure this is safe, use the 'nonempty' mount option
sudo vmhgfs-fuse .host:/ -o nonempty /mnt/hgfs -o allow_other
少掉坑,快乐学习,从我做起!