-2

(migrating this ticket to have correct answer for recent Ubuntu-s. Originally asked here, but most answers are obsolete.)

I've successfully installed VMware tools for Ubuntu. Everything seems to work fine, but shared folders were not mounted automatically. How do I get them to work?

TFuto
  • 524
  • 1
  • 4
  • 15
  • 2
  • No. That is why I created this Q&A. (Read with understanding. I referenced the very same ticket, that you put in your comment, both in the question and in the answer.) 1. That Q&A is 10 years old. 2. Full of obsolete stuff. 3. The accepted answer does not work. I flagged that Q&A for moderator intervention. This Q&A answers the question for modern Ubuntu-s. Cheers. – TFuto Jul 07 '21 at 19:25
  • @24601 Thank you for your input, but this is not constructive. 1. The old Q&A should be deleted based on the moderation rules (the old one is not relevant to mainstream Ubuntu. 2. If, as an user, I open that series of Answers (did that), it is super confusing why I have to dig through changes that are completely irrelevant to the question or recent Ubuntu's. 3. If you check my profile, you will see that I am not new to StackExchange, and I am actually trying to clean up the mess, and instead of you helping, you create an issue here. Cheers. – TFuto Jul 08 '21 at 11:53
  • @TFuto The answer you copied has currently the most upvotes. So everything is working fine, no need to copy it somewhere else. Read this for good/best practices to solve your problem. Or this for possible features of the future. – stackprotector Mar 02 '22 at 12:10
  • @stackprotector: To be honest, I dug quite long to find this answer, and I made changes based on (incorrect) answers that 1. did not work and 2. I had to undo. Now, those answers might work for older Ubuntu (there is historical value - sometimes I have to boot very old Ubuntus as well), but the default, accepted answer should "just work". I got your recommendations. I flagged old entries. There was no response or cleanup activity. There should be a feature to 1. tag answers with correct versions and 2. auto-hide answers not related to current Ubu versions. I will review the meta talk. Thanks. – TFuto Mar 02 '22 at 13:03
  • @stackprotector (Also, I don't have enough point here yet to make large scale cleanup of entries.) – TFuto Mar 02 '22 at 13:04

1 Answers1

0

(I am copying the answer of @con-f-use here from How do I mount shared folders in Ubuntu using VMware tools? for good housekeeping. If he re-creates his answer here, please upvote that, and I will accept that.)

For Ubuntu 18.04 (or recent Debian distros), try:

sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000

If the hgfs directory doesn't exist, try:

sudo vmhgfs-fuse .host:/ /mnt/ -o allow_other -o uid=1000

You may have use a specific folder instead of .host:/. In that case you can find out the share's name with vmware-hgfsclient. For example:

$ vmware-hgfsclient
my-shared-folder
$ sudo vmhgfs-fuse .host:/my-shared-folder /mnt/hgfs/ -o allow_other -o uid=1000

If you want them mounted on startup, update /etc/fstab with the following:

# Use shared folders between VMWare guest and host
.host:/    /mnt/hgfs/    fuse.vmhgfs-fuse    defaults,allow_other,uid=1000     0    0

I choose to mount them on demand and have them ignored by sudo mount -a and the such with the noauto option, because I noticed the shares have an impact on VM performance.

Requirements

Software requirements may require installing the following tools beforehand:

sudo apt-get install open-vm-tools open-vm-tools-desktop

Others have claimed the following are required:

sudo apt-get install build-essential module-assistant \
  linux-headers-virtual linux-image-virtual && dpkg-reconfigure open-vm-tools
TFuto
  • 524
  • 1
  • 4
  • 15