Internet

25 Command Prompt (CMD) Tricks that are Cool and Useful

Most of the Windows users are unaware of the power and amazingness of command prompt CMD. And frankly speaking, guys, using CMD can make you look like of pro in front of all others. This is because many of the window users find CMD as a black and white screen but they hardly know the magic behind this screen. This amazing tool lets you control the whole PC through commands. Can you even think of watching Star Wars in Command Prompt? Hardly any of you can do that. But eventually, anything and everything is possible in command prompt. So here we are with some best CMD tricks for you.

I am sure you enjoy trying these tricks on your computer.

25 Useful Command Prompt Tricks

CMD tricks

Here are 25 Useful and interesting Command Prompt CMD tricks with their command and details. Please check below.

1. Set Color to Command Prompt

CMD tricks

What happened? Were you in a myth that cmd screen is only black and white?

Sorry to prove you wrong but you can change the color of your Command Prompt to make it look colourful. It’s one of our best CMD tricks. Follow the step to change the colour:-

  1. Right-click at the top corners of the Command Prompt.
  2. Select Properties.
  3. Find the Colors tab.
  4. Look for the options to change the background and text colour.
  5. Set the colour of your choice.

Yeah, it’s that simple!

2. Help Command

With this command, you will get to know everything about every command. Just type help in command prompt.

CMD tricks

3. Create Wi-Fi hotspot

Before opening the Command Prompt you first need to change a setting in Network and Sharing option at Control Panel. Here you have to click on the connection you are using and check Properties. Here find the sharing tab and check the option “Allow other network users to connect through this computer’s internet connection.” Once done with this open Command Prompt with administrative privileges and enter the following command:

netsh wlan set hostednetwork mode=allow ssid=Youthotspotname key=yourpassword

It will enable your Hotspot. To start the Wi-Fi hotspot you will have to enter:

netsh wlan start hostednetwork

4. Turn OFF Wi-Fi hotspot

CMD tricks

To turn Off the Wi-Fi hotspot simply enter this command:

netsh wlan stop hostednetwork

5. Find a Website IP Address

CMD tricks

You can even find out any website’s IP Address from pinging the website through CMD.

For this particular cmd trick you have to type the following command:

ping address of website

eg: ping www.google.com

6. View installed drivers

Do you want to know is your software had installed successfully or not?

Are you facing some other hardware installation problem? Be with here we have a solution. Just type “driverquery” in CMD and hit Enter. Within a second you will have a list of all the current Windows drivers, alongside install dates and display names.

7. Show your Wi-Fi password

Use command “netsh wlan show profile SSID key=clear”, replacing “SSID” with the Wi-Fi name to know the password of your Wifi.

This command turns out to be useful in case when you had forgotten your Wifi password.

8. Powercfg

CMD tricks

Powercfg is a command that helps to get an analysis of Energy used by your computer. Well we use “powercfg /hibernate on” and “powercfg /hibernate off” to manage hibernation. Also to view power-saving states we use the command “powercfg /a”.

9. Abort a command

Want to undo a thing just click Ctrl+C and you are all done. Simple!

10. Create Undelete-able Folders CMD Trick

First of all, select the drive where you want to create the folder. Just keep in mind it must not have Windows installed on that drive. Now to create the undelete-able folder type any of these keywords “md con\” or “md lpt1\” and press Enter. So it should look something like this “D: md con\”. And you are done.

11. Scanning

CMD tricks

To know the CMD trick for scanning all you have to type is “sfc /scannow”. 

This command scans the overall system and finds corrupt file. It also replaces them if necessary.

12. Exit Command Prompt

The simplest of all CMD trick is how to Exit Command Prompt. To do this you have to type “Exit”. When you type exit command in command prompt, your command prompt will close.

 13. Know about your System

CMD tricks

systeminfo is one of the most amazing command prompt CMD trick. With the help of this command, you can know everything about your computer.

14. Change Format of a file

You can also use this command to know your file extensions. For say to change file formats txt to pdf type we will use following commands.

assoc .txt=.pdf  

15. Taskkill

CMD tricks

Tasks that appear in the “tasklist” command will have an executable and process ID (a four-digit number) associated with them. You can force stop a program using “taskkill -im” followed by the executable’s name, or “taskkill -pid” followed by the process ID.

Again, this is a bit redundant with Task Manager, but you can use it to kill otherwise unresponsive or hidden programs.

16. tracert  

Use this command to know how each packet interacts while moving to the destination.

tracert howto-connect.com

‘howto-connect.com’ is the name of server name here. You have to type the server name you want to search for.

 17. Tree

CMD tricks

This command represents the contents of a directory/ subdirectory in a tree format. The syntax for the C drive will be – tree c:/

18. nslookup

Use this command to find the IP address of your desired server.

nslookup howto-connect.com

‘howto-connect.com’ – server name.

19. sigverif

Use this command to know whether the file is digitally signed or not. Type “sigverif” and discover this CMD trick by your own.

20. Hide Files and Folders using Command Prompt

CMD tricksType the drive name where the folder is located and then enter this command “Attrib +h +s +r” and afterwards, enter the name of the file/folder you want to hide. So it should look something like this “D: Attrib +h +s +r haider”.

If the folder is inside another folder, then the command must come before the folder/file you want to hide not just after the Drive name. To again see the folder, use the same process above but change the command to “Attrib -h -s -r” from “Attrib +h +s +r”.

21. Netstat

Entering the command “netstat -an” will provide you with a list of currently open ports and related IP addresses. This command will also tell you what state the port is in – listening, established or closed.

22. Cipher

CMD tricks

The cipher command wipes a directory by writing random data to it. To wipe your C drive, use the command “cipher /w:c”, which will wipe free space on the drive.

23. Shut down your computer later

You can get your computer to shut down at some point in the future with the “shutdown” command. Add “-t xxx” to shut down with xxx being the number of seconds (from 0 to 315,360,000) and “-f” to force close any ‘you’ve got unsaved work’ dialogue boxes.

24. Use Function keys and become a pro user

Only a few people know the proper usage of the function keys in Windows Command Prompt. If you are not among one of them please go through the picture below

CMD tricks

25. Watch Star Wars in ASCII

For this first, you have to enable Telnet in Windows via Control Panel (click Programs then Turn Windows features on or off). Having done that, open the CMD window and type “telnet towel.blinkenlights.nl” then press Enter.

CMD tricks

So there were some of best 25 CMD tricks, hacks and commands that can help you perform more activities on Command Prompt. Hope you find this article helpful.

Also Read: Best WiFi Names of all time

Now just grab the command from the page and showcase your smartness among your friends.

About the author

Shourya Sharma

Add Comment

Click here to post a comment

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