Miku SANO / Sharing File With Ubuntu in VM 🤝

Created Sun, 04 May 2025 09:03:09 +0000
245 Words

I’d like to share my experience setting up a shared file system between a Host OS (Windows 10) and a Guest OS (Ubuntu 24.04) running in a virtual machine.

Although I followed the steps in this guide, I discovered that it lacked an important virtual machine setting required for proper connectivity.

How To Share File From Host Machine(Windows) To Guest Machine(Linux)

To verify whether the guest OS is accessble from the host, you can use the ping command after completing the setup on Ubuntu.

Run the following command in the Host OS terminal.

ping <IP addres of the Guest OS>

If you receive no response, it means the host cannot connect to the guest. In other words, file sharing will not work without proper network configuration.

In my case, I had to change the virtual machine’s network setting from ‘NAT’ to ‘Bridged Adapter’.

Because NAT(Network Address Translation) allows the Guest OS access the internet through a virtual router provibed by VirtualBox. However, inbound connections–from the Host OS or other devices on the network–are blocked by default. While this setup is more secure, accessing the Guest OS requires additional configuration like port forwarding.

In contrast, a Bridged Adapter makes the virtual machine behave like a real device on the same network as the host. This allows other devices, including the Host OS, to connect to the Guest OS directly.

Of course, this comes with security trade-offs, so appropriate firewall and access controles should be in place.