Method 1: Use the SharedFolders feature of virtualbox to install the additional component: Click Devices (device) ----- & gt; InstallGuestAdditions ...... A VBOXADDITION_4.0.4_70112 ISO image is displayed on the desktop. Enter the folder # cd/media/VBOXADDITIO.
Method 1:
Use the Shared Folders feature of virtualbox
First Install the additional components: Click the Devices (device) of virtualbox -----> Install Guest Additions ...... A VBOXADDITION_4.0.4_70112 ISO image is displayed on the desktop. Enter the folder # cd/media/VBOXADDITION_4.0.4_70112
Run autorun # sudo./autorun. sh to automatically install it. After installation, restart Ubuntu,
Click the Devices (device) of virtualbox -----> Shared Folders to add a Shared folder, such as ubuntu. The file is in the window and has been created in advance.
Finally, create a shared file in the mnt file, such as shared # sudo mkdir shared
Mount # sudo mount-t vboxsf ubuntu/mnt/shared
Note: Do not share files in Windows with those in ubuntu.
Method 2:
Use samba Server
First install samba
# Sudo apt-get install samba
# Sudo apt-get install smbfs
Create a user: # sudo useradd smb. This is used to log on to the samba server in the window.
Set Password: # sudo smbpasswd-a smb
Configure the samba server # cd/etc/samba/back up the smb. conf file # sudo cp smb. conf/etc/samba/smb. conf_backup
Modify the smb. conf file # gedit/etc/samba/smb. conf
[Global]
Add two lines under the workgroup
Doc charset = UTF-8
Unix charset = UTF-8
####### Authentication #######
Security = user (login is not required if share is used)
Add at the end of the file
[Shared file name]
Path = shared file path such as/home/smb created in advance
Available = yes
Browseable = yes
Public = yes
Valid users = smb
Save and exit
Run # sudo testparm to check the syntax. If Loaded services file OK appears, it indicates that the syntax is set.
Restart the samba server # sudo/etc/init. d/smb restart
In this way, you can enter the ubuntu ip address in the window to access ubuntu resources \ 192.168.1.105 (this is the ubuntu ip address, which can be viewed through ifconfig)
Note: The virtualbox network must be bridging