Windows 10下的Vagrant共享文件夹和符号链接

Kev*_*rst 6 virtualbox symbolic-link shared-folders vagrant windows-10

我在 Windows 10(VirtualBox 5.1.4,Vagrant 1.8.5)下有一个带有 Linux 的流浪盒。我正在以普通用户的身份使用 Git Bash。在 vagrant 框内,我无法创建符号链接:

c:/path/to/my/vagrant-project/ vagrant up + vagrant ssh
/home/vagrant/my-shared-folder/ $ ln -s /any/path/to/linux/box/folder my-symlink-name
/home/vagrant/my-shared-folder/ $ ln: creating symbolic link `my-symlink-name': Protocol error
Run Code Online (Sandbox Code Playgroud)

在 Windows 7 下,它正在使用:如何作为普通用户在 Windows 7 家庭高级版中创建链接?

那么,在 Windows 10 下有什么变化吗?

小智 0

已经有线程描述如何在 Windows 10 上创建符号链接

我只是快速地再次描述它。首先创建一个连接点

junction "C:\Documents and Settings\UserName\My Documents\My Dropbox\My Games" "C:\Documents and Settings\UserName\My Documents\My Games"
Run Code Online (Sandbox Code Playgroud)

使用 mlink创建目录符号链接:

mklink /D "C:\Documents and Settings\UserName\My Documents\My Dropbox\My Games" "C:\Documents and Settings\UserName\My Documents\My Games"

可以在此处授予创建符号链接的安全设置:

Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\

您还可以下载连接并使用命令创建。