Useful Aliases in Windows Command Prompt for Vagrant Users

The new Windows Terminal software has been released and by all accounts, the app should have been released in mid June but if you can’t wait till then to have some aliases in your command prompt, there is an alternative.

DOSKEY is a tool which adds command history, macros and better editing, apparently, but it’s the ability to use it for aliases that I will focus on here.

Fortunately, they are dead easy so let’s start by opening up a command prompt and when it appears, type this command:

Now type:

and press enter.

Shazam! You have saved yourself 2 characters of effort each time you want to clear the screen.

Quite useful, right? But close the command prompt and like a puff of smoke, the alias is gone. Let’s change gears and do something more useful and more permanent.

Starting with a fresh command prompt, create a folder on your C drive in the root called bin

Now create a text file called alias.cmd in that folder:

Say yes, when it asks you if you want to create a file. Next, add in these commands:

and save the file.

Now we need to tell Windows to run this file every time you start a command prompt, so for that, we are going to edit the registry. Don’t worry, though (it’s a simple change); if you are concerned, you can always back it up under File…Export.

Back to command prompt:

Click yes when prompted.

Now dig into the tree on the left and find the place named:

On the right hand pane, right-click and choose New, then String Value.

Type AutoRun in the name column and press enter.

Select the entry again, right-click, and choose Modify…

In the value field, type:

Click OK.

You can close regedit now.

Last thing to do is to test it so fire up a new command prompt and try out your alias. Of course, you will need to be in a homestead installation folder for these aliases, but if you used something else, it should work.


Written by Stephen Moon
email: stephen at

Hey! Did you enjoy reading this? If you did and would like an email when I add new content, just subscribe to my list. You can unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *