Preface:
Virtualpc is often used for porting and development, but it is a little troublesome to share files with the host. This article introduces two practical methods: FTP and mount command mounting.
(Note: The Linux host is the same as the Windows host)
1. Enable FTP in Windows-IIS to share files
A. Install IIS first (select FTP)
B. Set the FTP Master Directory and access permission in FTP properties in IIS.
C. After setting, run iisreset (restart IIS) in Windows-cmd)
In virtualpc, you can access FTP through FTP: // xxx.
2. Type A command in Linux-shell to share files.
In Shell, Enter command:
Mount-T smbfs-O username = xxx, password = xxx // xxx/Alibaba Folder/usr/share/XXX/Alibaba folder
The above is similar to creating a corresponding directory to map the shared directory under windows.
Note:
Windows shared directory: // xxx/movie folder
Linux ing Directory:/usr/share/XXX/folder
In virtualpc, you can directly access the ing directory.
Note: The file is shared in the Mount mode and is invalid after the machine reboot. Therefore, you can enter the command in/etc/profile (that is, the command runs immediately upon startup)
For more information about the Mount/umount command/application, see:
Mount (interpret the content of a file as a file system, and then attach it to a location in the directory)
Enable sharing:
Mount-T smbfs-O username = xxx, password = xxx // xxx/Alibaba Folder/usr/share/XXX/Alibaba folder
Note-1: Mount is only available for root users.
Note-2: The Mount effect disappears after the machine reboot
Therefore, if it is usercount and you want to use mount, perform the following operations:
1). Set the Mount permission relative to usercount:
Run cmddo in cmd to open the sudoers file.
Find the line "root all = (all) All" and add it below:
Usercount all = nopasswd:/bin/Mount
Note: input I to insert, Press ESC and enter: WQ to save and exit, Press ESC and enter: X to save and exit
2) set the above mount command to start upon startup
Compile the/etc/profile file
Add command at the end:
Sudo Mount-T smbfs-O username = xxx, password = xxx // xxx/login Folder/usr/share/XXX/login folder
Umount (detachable file systems currently in the Linux directory)
Unload sharing:
Umount // xxx/login folder
Summary:
In practical applications, I prefer to use the mount command, because you can use the convenient IDE in Windows to improve code writing efficiency, and then switch to virtualpc to use makefile for compilation, very nice ^_^.
(If FTP is used, it is very troublesome to transmit the file ~ _~)