Caffeine-Powered Life

Aliases in Windows Command Line

A few weeks back, Rob Conery posted on how to setup aliases in the Mac terminal. Guess what! It’s also quite easy to do the exact same thing in Windows. You can tell that the command is old, just because of the name: doskey.

If you want your settings to always load, you’ll need to create a startup script. I’ve named mine autorun.cmd, and I’ve placed in C:\util. The file (shortened) looks like this.

You then need to setup your terminal window to load with the /k option. I use Console, so here’s what my shell settings look like.

It’s pretty easy, and it can save you tons of time and keystrokes. Don’t be afraid of the command line, Windows users. It is your (seldom-used) friend.

Comments