Skip to content

Instantly share code, notes, and snippets.

@strarsis
Created March 16, 2018 18:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strarsis/468142f3e72db86e57f7da33c8a2deed to your computer and use it in GitHub Desktop.
Save strarsis/468142f3e72db86e57f7da33c8a2deed to your computer and use it in GitHub Desktop.
Vagrant on WSL (Bash on Windows)
# Vagrant
export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
export PATH=$PATH:/mnt/c/Program\ Files/Oracle/VirtualBox
export VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH="/mnt/c/Users/<Windows Username>"
  1. Install Vagrant for (normal) Windows (https://www.vagrantup.com/downloads.html)
  2. Download Vagrant for Ubuntu (.deb package) (https://www.vagrantup.com/downloads.html) and install it inside WSL (Bash on Windows) ((sudo) dpkg -i vagrant_<version>_x86_64.deb).
  3. Add additional code to ~/.bashrc in WSL (Bash on Windows) (see file below).
  4. Reload ~/.bashrc / restart shell.

Done, Vagrant should work correctly in WSL (Bash on Windows) now.

@strarsis
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment