Tuesday, 17 June 2014

Best Command Prompt (CMD) Tricks That you must know.

I like to Explore more about Windows, I often use Command prompt to get things done Pretty fast simply by typing Commands in CMD. Command prompt is not much used by people to perform tasks may be because users do not know how exactly to use it.

Cmd is been ignored by the users but actually its a very powerful tool and is not Useless at all.  With Command prompt you can not just Perform tasks easily but also you can have fun with it.While using CMD i have discovered many Awesome Command prompt tricks that i would like to share here.

5 Best Command prompt Tricks

Starting CMD:

Before moving futher with the Tricks, let me show you how to Open Command prompt in various Windows versions.

Press Win + R keys to open up RUN, type in CMD and press enter to open Command Prompt.


Simply Search for CMD or Command prompt and click on it to open Command Prompt in your Windows PC

1. Change Colours in CMD:

By default CMD have Black Background, but you can change its Background Color and font color too. Follow the Below steps to Play with Colors in Command prompt.

Step 1: Open Command prompt

Step 2. Type in Color 3 to change the Font color to Green. Different Colors have thier own different Codes. here are some Codes that you can try and use
0 = Black
1 = Blue
2 = Green
3 = Aqua
4 = Red
5 = Purple
6 = Yellow
7 = White
8 = Gray
9 = Light Blue
A = Light Green
B = Light Aqua
C = Light Red
D = Light Purple
E = Light Yellow
F = Bright White

Step 3: To change the Background Color of your CMD, simply Right Click on Top of your CMD and choose Properties.

Step 4: Now Click on Colors tab to choose your favourite color as Background color.

2. Check your I.P address and more about your internet.

With the help of Command Prompt you can easily find your IP address and DNS servers, command prompt will also return a ton of information like your host name, primary DNS suffix, node type, whether IP Routing, Wins Proxy, and DHCP are enabled, your network adapter`s description, your physical(MAC) address.

Step 1: Open CMD

Step 2 : Type in ipconfig /all

This will show you all the details about your internet Connection just like that.

3.Get Help from Command prompt.

If you are Confused and Do not know what command does what task. Then you can simply ask Command prompt to help you understand what task with the Command Perform on execution.

Simply Type in this format YourCommand/?  to get all details what that command will do. For eg: Type color 3/? to know what Color 3 command do. it will show you that color 3 command will change the font colour of your CMD. Likewise you can check for any given command.

4.Use && to run more than one command in a single line

When you want to execute more than one command in a single line use the && operator.

For Eg: hostname && whoami

The above command will display both your computer name as well the logged in user name.

5.Hide/Unhide Files and Folders

Another awesome CMD trick by which you can Hide any files or folder using CMD and you can unhide it easily too.

Yes there is a Command for it which we will execute in order to perform this trick so lets see how this is done.

Step 1: Open CMD

Step 2: Type this Command  without Quotes> "attrib +s +h Your_File_location" . Your_File_Location means the place where your files is located in your Hard disk. For Eg: I want thide a folder with name "Videos" which exists in my "D" drive, then i will Type "attrib +s +h D:\Videos" 

Step 3: The Above Command will hide my Videos folder from D drive. To Unhide it just Type this command "attrib -s -h D:\Videos"

Only Difference between both the Command is "+" & "-" Signs. 

So these were 5 Best Command Prompt Tricks for you. Do it yourself and let me know in Comment box if you like them.

Must Read: 3 Simple tricks to optimize your Pc for Better Performance

If You Like This Post Please Mind to Share It.
Technorati Digg This Facebook Twitter Stumble Stumble


  1. Small correction, you forgot the space between ipconfig and the /all switch in #2.

    1. no correction .... it works both ways ....

    2. Hi Brian, Thanks for Pointing Out, But @Alex is right. ipconfig/all also worked for me, Let me know if you have any trouble.

  2. I heard that by using attrib command we could delete the virus from the system. Is it so? If yes can u xplain hw?

  3. I already discovered the trick on my own.

  4. I uses attrib but it is showing an error namely
    " the filename,directory name,or volume label syntax is incorrect

    1. Exactly, Make sure the Directory of your file is Correct.

  5. In fact after going through your tricks i have mastered on my own now.I now teach my mates in school. Thank you so much..

    1. Good to hear that from your Bola ray,

  6. After learning your tricks on CMD. I have now mastered in it very well.

  7. Replies
    1. Thanks Mohit, Keep visiting. there is much more to come.

  8. How can i find hidden files or video & folders without know a file name or folder name

  9. is it possible to find a hidden folder, if you can't remember the name?

  10. how can i find my username and password of my service provider using cmd

  11. you also can change your font & background color @ the same time. E.g type "color fc" it gives Red font on White background OR "color 03" gives aqua font on Black background.

  12. Can u tell me... How to make wifi hot spot using cmd....