Skip to content

Instantly share code, notes, and snippets.

@validatorru
Created December 9, 2018 21:01
Show Gist options
  • Select an option

  • Save validatorru/0e9b004207f7a82050a43315ca406ad8 to your computer and use it in GitHub Desktop.

Select an option

Save validatorru/0e9b004207f7a82050a43315ca406ad8 to your computer and use it in GitHub Desktop.
A bash script to stop all running vagrant instances and run vagrant up in the current dir.
# messy but working on my machine
# adapted from https://askubuntu.com/questions/457329/shutting-down-all-virtualbox-vagrant-vms-in-one-easy-to-use-bash-command-that/617585#617585
vagrant global-status | grep running | cut -c 1-9 | while read line; do echo $line; vagrant halt $line; done;
vagrant up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment