How to mount host folder in VMware 20.04 on Windows.
This time I want to use ubuntu20.04 on VMware as my workspace. But I don’t want to move and backup my files frequently. So I need to find a way to mount my host files to virtual machine.
First I need to install VMware-tools to my virtual machine. With some reasons, I can’t install it autoly( The button is grey). So use the next bash command to install it.
sudo apt install open-vm-tools-desktop
Then close the virtual machine. Select VM>Settings. On the Options tab, select Shared Folders. Select a folder sharing option. Click Add to add a shared folder. I add a folder named workspace.
Now you can start this virtual mechine.
Open a terminal. use id <user> to get your gid and uid. My git and gid are 1000.
Now We can mount the workspace folder to any folder in virtual machine through next command.
sudo vmhgfs-fuse .host:/workspace ~/workspace -o allow_other -o uid=1000 -o gid=1000
Finally we can use this virtual machine to develop our projects.