Skip to content

Instantly share code, notes, and snippets.

@MrAnyx
Last active October 6, 2021 15:25
Show Gist options
  • Save MrAnyx/f9e659528e12ef77d35e02aaee4ce40c to your computer and use it in GitHub Desktop.
Save MrAnyx/f9e659528e12ef77d35e02aaee4ce40c to your computer and use it in GitHub Desktop.
Access homestead command from anywhere on windows
function homestead() {
( cd <homestead-directory-path> && vagrant $* )
}
@MrAnyx
Copy link
Author

MrAnyx commented Aug 20, 2020

  1. create an .bashrc file on your user directory. Usually, this directory is located in C:\Users\<your-user>

  2. Type in the following function :

function homestead() {
    ( cd <homestead-directory-path> && vagrant $* )
}

Save the file

⚠️ If your homestead directory location is : C:\data\homestead then, is this <homestead-directory-path> you should type /c/data/homestead

  1. Retart your terminal. Now, you can access the homestead command like vagrant up or vagrant ssh by typing homestead up or homestead ssh

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