Skip to content

Instantly share code, notes, and snippets.

@pgcd
Forked from strarsis/.bashrc
Created March 8, 2022 10:45
Show Gist options
  • Save pgcd/c9e59d47697752c1d776d4649d5459fc to your computer and use it in GitHub Desktop.
Save pgcd/c9e59d47697752c1d776d4649d5459fc 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.

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