Designinglives

June 23, 2017 at 5:23 pm

Vagrant commands

Since installing vagrant I’ve took some time to experiment with these commands, here are the most important ones I’ve come across.

vagrant up
This will start the vagrant server as well as resume the environment in which you want to start working.

vagrant suspend
Pausing the virtual environment can be done this way. Best practice is to use this command before a system shutdown.r computer to safely be able to restore the environment later.

vagrant destroy
As it says, it will destroy (as in permanently) you virtual box.

vagrant reload
This will reboot your box, this can be useful if an error occurs or you need to update the configuration in any way.

vagrant ssh
If by any chance you need to login to your virtual box you can use this as a command. I also setup an alias to make login in a breeze, use the following command to do such a login.

alias vm="ssh vagrant@127.0.0.1 -p 2222"

vagrant ssh-config
This will give you some detailed information about your vagrant install.

More commands and more information about the ones above can be found inside the Vagrant documentation.

0 likes vagrant
Share: / / /