How to Access Shared Folders in VMware on Kali Linux: A Step-by-Step Guide for Newbies

W
Waseem Akram
Researcher, Pentester, Dev
2025-02-06
5 min read
5,262 views
Featured image for How to Access Shared Folders in VMware on Kali Linux: A Step-by-Step Guide for Newbies

Virtual machines (VMs) are incredibly useful for running different operating systems on a single machine. VMware is a popular choice for creating and managing VMs. One of the most useful features of VMware is the ability to share folders between your host machine and the VM. This guide will walk you through the process of setting up a shared folder between your host machine and a Kali Linux VM, ensuring even a newbie can follow along.

Step 1: Setting Up a Shared Folder in VMware

Before you can access a shared folder in Kali Linux, you need to configure it in VMware.

  1. Open VMware Workstation/Player:
    • Launch VMware Workstation or VMware Player on your host machine.
  2. Select Your Virtual Machine:
    • From the list of VMs, select the Kali Linux VM where you want to access the shared folder.
  3. Access VM Settings:
    • Right-click on the VM and select "Settings".
    • Alternatively, you can select the VM and click "Edit virtual machine settings".
  4. Add a Shared Folder:
    • In the settings window, navigate to the Options tab.
    • In the left pane, select "Shared Folders".
    • Set the "Folder Sharing" option to "Always enabled" or "Enabled until next power off or suspend", depending on your preference.
    • Click "Add" to create a new shared folder.
  5. Configure the Shared Folder:
    • In the wizard that opens, click "Next".
    • Browse to the folder on your host machine that you want to share.
    • Give the shared folder a name (e.g., Desktop, if you're sharing your desktop).
    • Check the box labeled "Enable this share".
    • Optionally, you can select "Read-only" if you don't want the VM to modify files in the shared folder.
  6. Finish Setup:
    • Click "Finish" to complete the shared folder setup.
    • Click "OK" to close the VM settings window.

Your shared folder is now configured in VMware. The next steps will guide you through accessing this shared folder in Kali Linux.

Advertisement

Step 2: Install VMware Tools in Kali Linux

VMware Tools is a suite of utilities that enhances the performance of the virtual machine's guest operating system and improves management. Installing VMware Tools is crucial for enabling features like shared folders.

  1. Start Your Kali Linux VM:

  • Power on your Kali Linux VM by clicking "Play virtual machine".
  • Open a Terminal:

  • Advertisement

    • Once Kali Linux has booted up, open a terminal window.
  • Update the Package Repository:

    • Before installing VMware Tools, ensure your package repository is up to date:

    sudo apt update
  • Install Required Packages:

  • Advertisement

    • Install the required packages for building the VMware Tools modules:

    sudo apt install open-vm-tools open-vm-tools-desktop fuse
  • Restart the VM:

    • After installation, restart your VM to apply the changes:

    Advertisement

    sudo reboot

    With VMware Tools installed, your VM is now ready to access shared folders.

    Step 3: Access the Shared Folder in Kali Linux

    Now that you've configured the shared folder in VMware and installed VMware Tools, you can access the shared folder from within Kali Linux.

    1. Create a Mount Point:

    Advertisement

    • A mount point is a directory where you can access the shared folder. You can create a mount point anywhere in your file system. In this guide, we'll create it under /mnt/hgfs/:Replace desktop with the name of your shared folder if you named it something else.

    sudo mkdir -p /mnt/hgfs/desktop
  • Mount the Shared Folder:

    • Use the following command to mount the shared folder:Replace <shared_folder_name> with the actual name of the shared folder you set up in VMware.

    Advertisement

    sudo mount -t fuse.vmhgfs-fuse .host:/<shared_folder_name> /mnt/hgfs/desktop -o allow_other
  • Access the Shared Folder:

    • Navigate to the mount point to see the contents of the shared folder:You should see the contents of your shared folder listed.

    cd /mnt/hgfs/desktop
    ls

    Step 4: Automount Shared Folder on Startup (Optional)

    If you want the shared folder to be automatically mounted each time you start your VM, you can add the mount command to the /etc/fstab file.

    Advertisement

    1. Open the fstab File:

    • Open the /etc/fstab file in a text editor:

    sudo nano /etc/fstab
  • Add the Mount Command:

  • Advertisement

    • Add the following line at the end of the file:

    .host:/<shared_folder_name> /mnt/hgfs/desktop fuse.vmhgfs-fuse allow_other,defaults 0 0
  • Replace <shared_folder_name> with the name of your shared folder.

  • Save and Exit:

  • Advertisement

    • Save the file and exit the text editor (in Nano, press Ctrl+X, then Y, and Enter).

    Now, the shared folder will be mnted automatically whenever you start your VM.

    Troubleshooting Tips

    • Shared Folder Not Showing: Ensure that the VMware Tools are properly installed. Sometimes, a simple reboot after installation can resolve the issue.
    • Permissions Issues: If you face permission issues, ensure that you have the necessary permissions on the shared folder and that it's not set to read-only if you need write access.
    • Mounting Issues: Double-check the folder name and mount point. Ensure there are no typos in your commands.

    Conclusion

    Accessing shared folders in VMware with Kali Linux is straightforward once you've set up everything correctly. This guide walked you through the process step by step, ensuring that even those new to virtual machines can follow along. Now you can easily share files between your host machine and Kali Linux VM, making your workflow much more efficient.

    Happy learning and hacking with Kali Linux on VMware!

    Advertisement

    W

    Waseem Akram

    Researcher, Pentester, Dev

    Cybersecurity expert and educator with a passion for sharing knowledge and helping others stay safe online.

    Comments

    Comments are currently disabled. Please share your thoughts on social media.

    Related Articles