Thursday, March 27, 2025

Enable shared folders in ubuntu in vmware?


 To enable
Shared Folders in Ubuntu (VM) on VMware, follow these steps:


Step 1: Enable Shared Folders in VMware Settings

  1. Power Off the Ubuntu virtual machine.
  2. Open VMware Workstation or VMware Player.
  3. Select your Ubuntu VM.
  4. Click on Edit virtual machine settings.
  5. Go to Options β†’ Select Shared Folders.
  6. Set it to Always Enabled.
  7. Click Add, then:
    • Browse to the folder on your host machine.
    • Select Enable this share.
    • Give it a name (e.g., Shared_Folder).
  8. Click OK β†’ Start the Ubuntu VM.

Step 2: Install VMware Tools in Ubuntu

If Shared Folders don’t appear, you need to install VMware Tools.

  1. Open Terminal (Ctrl + Alt + T).
  2. Run the following command:
  3. sudo apt update && sudo apt install open-vm-tools open-vm-tools-desktop -y
  4. Restart your VM:
  5. sudo reboot

Step 3: Access the Shared Folder in Ubuntu

Once installed:

  • Open Files (File Manager).
  • Navigate to:
  • /mnt/hgfs/
  • You should see your shared folder inside.

If /mnt/hgfs/ is empty, mount it manually:

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


Step 4: Automate Mounting (Optional)

To mount the shared folder automatically on every boot:

  1. Edit the fstab file:
  2. sudo nano /etc/fstab
  3. Add this line at the bottom:
  4. .host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0
  5. Save and exit (Ctrl + X, then Y, then Enter).
  6. Run:
  7. sudo mount -a

βœ… Now your shared folder should be accessible in Ubuntu inside /mnt/hgfs/. πŸš€

 

If any error like : sudo: vmhgfs-fuse: command not found

If you get sudo: vmhgfs-fuse: command not found, it means that the required VMware Tools (open-vm-tools) are either missing or not installed correctly. Follow these steps to fix it:


Step 1: Reinstall VMware Tools (open-vm-tools)

Run these commands in Terminal:

sudo apt update

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

Then restart your VM:

sudo reboot


Step 2: Mount Shared Folders Manually

Try this command again:

sudo mkdir -p /mnt/hgfs

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other

Now check the shared folder:

ls /mnt/hgfs


Step 3: Check if vmhgfs-fuse Exists

If you still get command not found, check if the vmhgfs-fuse binary exists:

which vmhgfs-fuse

If it returns nothing, try this:

sudo updatedb

locate vmhgfs-fuse

If it’s missing, VMware Tools might not be installed correctly.


Step 4: Reinstall VMware Tools from VMware GUI (Alternative)

  1. Shut down the VM and go to VMware settings.
  2. Detach and reattach the VMware Tools ISO:
    • Click VM β†’ Install VMware Tools (or "Reinstall VMware Tools").
    • If the VMware Tools ISO does not mount automatically, manually mount it:
    • sudo mount /dev/cdrom /mnt
  3. Install it manually:
  4. cd /mnt
  5. ls  # You should see a file like VMwareTools-<version>.tar.gz
  6. sudo tar -xvzf VMwareTools-*.tar.gz -C /tmp
  7. cd /tmp/vmware-tools-distrib
  8. sudo ./vmware-install.pl
  9. Restart Ubuntu:
  10. sudo reboot

After reboot, try mounting the shared folder again:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other

βœ… Now, check /mnt/hgfs/ again for your shared folders. πŸš€

Let me know if you still face issues! 😊

 

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

Enable shared folders in ubuntu in vmware?

 To enable Shared Folders in Ubuntu (VM) on VMware , follow these steps: Step 1: Enable Shared Folders in VMware Settings Power...