Vagrant Alias to Make Life Easy: vurp

Posted by on December 30th, 2013

I’ve been using Vagrant on a daily basis for over a year now, and there is one common issue I run into: Sometimes VirtualBox’s network will hang and I need to force shutdown & re-up the instance. If you use NFS on Mac, this will also require some administrator privileges half the way through the process.

So what did I do? I made an alias for my terminal. In my ~/.bash_profile file I added this line:


alias vurp="sudo -v ; vagrant halt -f ; vagrant up"


What that does is it first prompts me to refresh my sudo password at the very beginning, then force halts the vagrant instance, then ups it again.

It’d be nice if I didn’t have to do this, but hey, it only happens once and awhile.


Justin is a Sr. Director of Engineering at Deseret Digital Media, Previous President of the Utah PHP Usergroup, and frequently works with the Utah Open Source Foundation which organizes the OpenWest Conference. Justin loves just about anything with web technologies from PHP, JavaScript, Node.js, Salt, and managing engineering teams.

Learn More