下载 Ubuntu

Index of /ubuntu-releases/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
vmware 安装方法
(12条消息) 虚拟机ubuntu16.04超详细安装教程(零基础照做即可)_ubuntun16.04 安装虚拟机_LKTracker的博客-CSDN博客

安装 VMware Tools

1
2
sudo apt-get install open-vm-tools-desktop -y
sudo reboot

换源

备份文件

1
sudo cp /etc/apt/sources.list sources_backup.list

修改文件

sudo gedit /etc/apt/sources.list

1
2
3
4
5
6
7
8
9
10
11
#清华大学源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

更新

1
2
3
sudo apt-get update
sudo apt-get -f install
sudo apt-get upgrade

SSH 连接

windows宿主机如何SSH连接VMware的Linux虚拟机 - 腾讯云开发者社区-腾讯云 (tencent.com)

共享文件夹

  1. 在 vmware 中设置共享文件夹
    即在 VMware workstation 中:虚拟机设置 -》选项 -》共享文件夹,浏览要共享的文件夹,继续按照说明设置即可。

  2. 在 linux 中链接一下即可
    第 1 步完成后,共享文件夹已经挂载到了 /mnt/hgfs/share/ ,share 是我的共享文件夹的名字,然后在创建一个软连接方便以后访问:

1
sudo ln -s /mnt/hgfs/share/ /home/share

Ubuntu 重启后不显示共享文件夹

重启 Ubuntu20.04 后,发现共享文件夹进不去也不显示了
首先查看共享文件夹是否已经存在并且设置为总是开启
使用命令查看当前挂载的共享文件夹

1
vmware-hgfsclient

存在的情况下,然后使用下面命令

1
sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

在 Linux 客户机中装载共享文件夹 (vmware.com)

但是由于上面的方法需要每次重启后都去设置一遍,可以把执行的命令放到/etc/rc.local 文件下;让它开机自动执行

1
sudo vi /etc/rc.local

若/etc/rc.local 是一个空文件则在里面添加

1
2
#!/bin/sh -e
sudo vmhgfs-fuse .host:/ /mnt/hgfs -o nonempty -o allow_other

给文件执行权限

1
sudo chmod +x /etc/rc.local

最后重启虚拟机

1
reboot

无法应用原保存的显示器配置(屏幕显示问题)

(12条消息) 虚拟机Ubuntu开机后提示:无法应用原保存的显示器配置(屏幕显示问题)_DTU-CFDer的博客-CSDN博客