Customizing Windows Command Prompt

22.Oct.2012

The windows command prompt – It’s a lot more powerful than you think it is. I always thought the Linux shell was awesome, but after having used the windows ‘cmd’ for a while now, I think it has pretty much everything the Linux BASH did and I don’t miss the Linux one. Oh, and there’s also powershell. Checkmate BASH.

Power shell is way too awesome to even begin talking about here. So, I won’t. I will however, talk about how I’ve customized my windows cmd prompt.

1. Get some basic tools.
Console2 and Sysinternals Suite. Console2 is a tabbed console window, and it’s pretty awesome. Open source too. Sysinternals Suite is a collection of invaluable tools. Must have.

2. Create a launcher that allows you to run a script.
This is easy, create a new shortcut with this target: cmd /K “c:\setenv.cmd”. This can be done by adding a tab to Console2, and setting that in the “Shell” textbox.

3. Define the “c:\setenv.cmd” file for you purposes.
Mine does the following:

    – Set the prompt format -> prompt $P$_$G$S (I like the entire path on one line, so it’s easy to copy and read – but you can do your own thing)
    – Load of my favorite macros -> doskey /macrofile=C:\macros
    – Set some path variables -> set PATH=%PATH% (I also included the folder where I unpacked the Sysinternals Suite)

4. Define the macrofile
This is a list of macros that you define in the file you point to above (c:\macros) and I believe this file keeps evolving over time, you add stuff as you see fit, or when you learn about something new. Very helpful.

5. Change the colors/font
I use one of these fonts, designed specifically for the console, and I honestly prefer a light text on a dark background, as it’s just so much easier on the eyes.

Imagevivek

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: