I use Vagrant quite a bit in my day-to-day activities. I have found a bunch of commands I use often can be long and cumbersome, and get quite annoying when I need to type them several times each day.

For example one of the very first things I do when opening up a project is boot that specific projects development virtual machine and ssh into it.

vagrant up;
# ... machine boots ...
vagrant ssh;
# ... vagrant starts a SSH session ...

That is quite a few keystrokes for someone as lazy as me to type, especially when I need to do it several times a day.

I like to reduce the amount of duplicate code I need to write on a daily basis, so I wrote a bunch of aliases to help me out.

alias vd='vagrant destroy;'
alias vgs='vagrant global-status;'
alias vh='vagrant halt;'
alias vu='vagrant up;'
alias vs='vagrant ssh;'

This means, that to do the same command sequence mentioned above all I would need to type is this:

vu vs
# ... virtual machine boots ...
# ... vagrant starts a SSH session ...

This is much nicer. In fact, it is only 21.7% as many characters. I can do better though, so I added one additional alias to the list above.

alias vus='vu vs'

Now that string from above has been reduced to only 3 characters. Much better than the initial 23. I have reduced the total number of characters I need to type in this case by 86.9%. I say that is a job well done.

If you would like to use these commands on your own you can. Just copy/paste them into your terminal and you will have access to them. If you would like them to persist between your sessions though, you will need to add them to your bash profile. For me that is my "~/.bash_rc" file, but it might be different on your system.