When creating a virtual machine with KALI LINUX installed in VirtualBox, there are many cases where you want to link files between the host (physical machine) and the guest (virtual machine).
One way to exchange files between a host and a guest is to set up a shared folder, so I'll leave the setup instructions here.
how to install VirtualBox and how to install KALI LINUX on VirtualBox , so please refer to this if you have not installed VirtualBox.






Create folders on the host (physical machine) and guest (virtual machine).
First, create a folder to share with your host and guests.
You can now share this folder by mounting it.
Create a folder on the host
First, create a folder to share with the host.
This time, I created a folder called Share directly under the user folder.

Create a folder for the guest
Next, create a folder in the guest.
Create a Share directly under /(root).
sudo mkdir Share
It's fine as long as you can create it like this.

Set up a shared folder.
Once you have created folders for the host and guest, set up the shared folder.
Shared folder settings
Open the settings under Device > Shared Folders > Shared Folders.
When the settings screen appears, select the "Add Shared Folder Icon."

Adding shared folder settings.
This time, rather than automatically mounting, we will manually mount it on the guest side.
- Folder path: Host side folder path
- Folder name: Shared folder name (required when mounting).
- Read-only: OFF
- Auto mount: OFF
- Mount Point: Guest Folder Path
- Permanent: ON

It's OK as long as the settings have been added to the shared folder!

Mount as a guest
Once you have set up a shared folder, mount it as a guest.
The command to mount is as follows:
sodu mount -t vboxsf [shared folder name] [mount destination directory]
In this case, it would look like this:

Mount's
The mount is complete above, but if it continues like this, the mount will fall off if it is restarted.
So, make sure to set it up so that it will mount every time you start it.
We will add the mount information to a file called fstab.
- fstab
-
A file that describes the file system information to be mounted
sudo vi /etc/fstab
This is what the additional sentence is like this.
Share /Share vboxsf defaults 0 0

Once you save it, you'll be done with the shared folder settings!
Let's check its operation.
Once you've done this, check the operation and finish it!
I would like to check if the automount is working, so please restart it.
Once you have restarted, try creating a folder in the shared folder on the host.

The folder you just created is displayed in the shared folder on the guest side, so it doesn't seem to be a problem.
cd Share ll

summary
Having a shared folder makes it very easy to exchange files between the host and guest, so it's a good idea to set it up.
Also, if you can do this, I recommend taking a snapshot.
If you don't know how to take snapshots, please refer to the information at the end of How to Install KALI LINUX in VirtualBox
