TLDR: Activate the Windows feature “Create symbolic links”, then symlinks within Vagrant/VirtualBox shared folders will work. How-to: SuperUser.com
For some of our projects, we are using Vagrant with VirtualBox on Windows. If you do the same, one thing you probably noticed is that you then cannot use symlinks within shared folders. This is especially annoying as dependency managers like npm and composer are sometimes symlinking a binary to from a package folder into
node_modules/bin/<binary>. While workarounds exist (such as
--no-bin-links in npm), this gets annoying & sometimes the workaround do not work.
Turns out - symlinks work just fine on a Windows host, but you need to activate the feature. You need to grant your Windows user the permission “Create symbolic links” (How-to: SuperUser.com. Please note: Activation has to be done by a user with admin privileges), log out and log in again => and symlinks within shared folders will just work (Vagrant automatically uses the feature, as documented in their docs) 😍
Maybe you can now remove some of these ugly workarounds (I certainly could) 😁
Note of warning: There is a reason this feature is not activated for standard users - security. Enabling this feature has some security implications (which, in my opinion, are worth it if you are developing software). Please see this Microsoft documentation entry for information about the symlink feature & its security implications.
- Resources: Learning web languages the modern way
- JupyterLab: Run a fresh instance in 1 minute (= 3 commands)
- csplit: Splitting a text file into individual files according to a certain pattern
- My Windows setup
- Tea Board: Trying out tea & rating it
- Linux (Debian/Ubuntu): Finding out whether a package is installed
- Windows: Adding programs to autostart
- Hosts file: What is it, why is it useful & how to edit it?
- SSH: Finding out ECDSA key fingerprint (both server-side & client-side)
- PowerPoint: Inserting Source Code with Syntax Highlighting