Have you ever tried any Command Prompt tricks to get your tasks done faster and more effectively?

As you must be aware, a command prompt is the input field in a text-based user interface screen for an operating system or program. It was used earlier in MS-DOS systems and is still popular while using Linux even in the present day and is also a part of the modern Windows operating system.

Here we have listed some useful Command Prompt tricks that make it easier to get some results for your issues. Whether it is about scanning your system files or getting the insights of your IP or Mac address, the Command Prompt promises to deliver quick answers.

See More: Bypass the Command Prompt by Using the Windows Explorer Address Bar

Here are 22 Best Command Prompt tricks for a Windows user.

1. See your Wi-Fi profile

wifi-profile-command-prompt-tricks
Checking your WiFi profile with the Command Prompt

Using “netsh wlan show profile SSID key=clear” you can see your Wi-Fi details where SSID is Wi-Fi name of the network. For, e.g., in our example, the SSID is TNT.

2. Change the Color of the CMD Window

change-color-command-prompt
Changing the color of the CMD window with the Command Prompt

The text color of Command Prompt Window is White by default which seems quite dull. There is a simple command that will let you change the text color of the Command Prompt Window.

You have to launch the cmd Window and type for, e.g., “color 6“. Now, hit Enter and you will see the color of text has been changed to Yellow. You can check other colors as well by typing “help colors.

3. Change the Prompt Text in Command Prompt

command-prompt-tricks-use-characters
Change the Prompt Text in Command Prompt

When you first open the Command Prompt, you will see some default text displaying the path of some directory. If it doesn’t suit you, customize it in your preferred way.

First, launch the Command Prompt and type “prompt” with the text you want to display. Make sure that you end your text with $G which will put a “>” sign so that you can understand that your new command begins at that point.

In the above example, the default text is C:\Users\Shraddha and we have changed it to “technorms” by using the command “prompt technorms$G”. $G is used to insert a “>” symbol after the customized name.

You can check other options like $G ($G is used to insert “>” symbol) by typing “help prompt.” You can get back to the default text, by simply typing “prompt” and hitting Enter.

4. Change the Title of the Command Prompt Window

command-prompt-tricks-change-title
Change the Title of the Command Prompt Window

When you launch Command Prompt, for example, you can see the title bar saying, C:WINDOWS\system32\cmd.exe.

Sometimes you have multiple Command Prompt Windows opened to work at different issues at the same time. It may confuse you to differentiate between them. We recommend that you change some text that will help in differentiating the multiple Command Prompt Windows.

Open the Command Prompt and type “title” with the text you want to set as the Title bar, and hit Enter.

You can see that the title has changed to your customized name. Although the title will change to its default name when you re-launch the Command Prompt, it is handy to use when you have to work with multiple Command Prompt Windows.

5. Watch an ASCII Version of Star Wars: A New Hope

start-wars-command-prompt-tricks
How to watch an ASCII Version of Star Wars with the Command Prompt.

 

star-wars-command-prompt-tricks
How to watch an ASCII Version of Star Wars with the Command Prompt.

You can have fun with this cmd trick! You can watch an ASCII text version of Star Wars: A New Hope right there in Command Prompt.

This method uses Telnet, so you have to make sure that Telnet is enabled on your Windows. To enable Telnet, go to Control Panel > Programs > Programs and Features > Turn Windows features on or off and turn on the Telnet service.

Now go to Command Prompt and type “telnet towel.blinkenlights.nl” and hit Enter. The movie (ASCII text version of Star Wars: A New Hope) will start playing.

6. Create a Wi-Fi Hotspot – A Command Prompt Trick

You can create your Wi-Fi hotspot and share your internet connection with other devices using the Command Prompt.

Launch the Command Prompt and type “netsh wlan set hostednetwork mode=allow ssid=HotspotName key=Password”.

Here “HotspotName” will be the Wi-Fi hotspot name that you want and “Password” is the password that you set. Finally, hit Enter to run the command.

Now, to broadcast the hotspot, type “netsh wlan start hostednetwork” and hit Enter. The other devices can connect to your network.

When you want to stop broadcasting your Wi-Fi hotspot, you will have to type “netsh wlan stop hostednetwork” and Enter.

7. Hide Folders using Command Prompt

hide-folder-cmd-tricks
How to hide folders using the Command Prompt

Although you can easily hide folders in Windows by going into the properties of the folder and checking the box that says “Hidden”, the method is not always reliable.

All you have to do to reverse it is to type, “Show hidden files and folders”.

Hence, a completely safe way to hide any folder is to use the Command Prompt. Open the Command Prompt and navigate to the directory where your folder is. Now, type “Attrib +h +s +r folder_name“ and Enter, where folder_name is the name of the folder that you want to hide.

You can check if your hidden folder action is done. To show/view that folder again simply type the words “Attrib -h -s -r folder_name”. You can view all hidden folders using command “dir /AH”.

8. Copy Command Output to Clipboard

copy-command-result-to-clipboard-command-prompt-tricks
Copy Command Output to Clipboard

Did you ever want to save your Command Prompt output somewhere in a file? Simply, launch the Command Prompt and type “Command | clip”, where the Command is your command that you want to run and save. Suppose if you want to run a command “getmac and save its result, type “getmac | clip” and the result will be stored as shown in the image.

5 copy command reult to clipboard command prompt tricks1

9. List all Installed Programs – An Easy Command Prompt Trick

list-all-the-programs-cmd-tricks
Listing all Installed Programs with the Command Prompt

Using this simple Command Prompt trick you can list all the programs that are installed on your computer. Open the Command Prompt and type “wmic product get name“ and hit Enter.

Right from Command Prompt, you can also uninstall a program. To uninstall a program from Command Prompt, type wmic product where “name like ‘%NAMEOFAPP%’” call uninstall /nointeractive” and hit Enter. Here the “NAMEOFAPP” is the name of the app that you want to uninstall.

10. Open CMD Window Inside a Directory

Navigating to a specific directory in Command Prompt using “cd” command may sometimes be tiresome. This cmd trick can open the Command Prompt right from inside a directory. This trick is useful when the directory you are looking for deeply buried inside the filesystem.

Open the required directory in Windows Explorer. Now, in the address bar type “cmd” and hit Enter.

open-command-prompt-in-a-directory-cmd-tricks

open-command-prompt-in-a-directory-cmd-tricks

Now, you can see that the Command Prompt is opened right inside the directory from where you opened it in Windows Explorer.

open-command-prompt-in-a-directory-cmd-tricks

11. Save a command result in a file – with a Command Prompt Trick

save-command-result-in-a-file

There are times when you want to save the result of a command. Using this simple cmd trick you can save the command result in a .txt file.

All you need to do is type “command > destination/file name with .txt extension” and hit Enter. Here the “command” is the command whose result you want to save.

In this example, we have run “ipconfig > d: \Networkinfo.txt” where ipconfig is the command, d: is the destination, and Networkinfo is the file name with the extension .txt.

12. Get Help

get-help-cmd-hacks
Getting Help with the Command Prompt

This trick is very useful if you are just getting started with Command Prompt. This cmd hack is to get help on all commands.

You can get all the details about a command that how it works along with some examples. To fetch help on any command simply type “/?” at the end of that command. For example, we obtained help on “getmac” command by typing “getmac/?

13. Simple Command Prompts Tricks – Use Function Keys

Default Function keys on the keyboard multitask in a lot of ways. The Command Prompt also uses them liberally. Let’s take a look.

F1: Copies single character from the same column in the template to the same column.

F2: Pastes the last used command to a specific character of the command.

F3: Simply pastes the last used command.

F4: Deletes the command to a specific character of the command.

F5: Pastes the last used command without any cycle.

F6: Puts an end-of-line character(CTRL+Z) at the current position.

F7: Displays a list of previously used commands

F8: Displays all the commands in the history buffer that starts with the character in the current command.

F9: Displays a history buffer command number, and then you can see the commands associated with the number you entered. It lets you paste the command from the list of recently used commands.

14. Cycle Through Folders

When you are using the Command Prompt, to navigate to a specific directory gets troublesome sometimes. But if you know the drive or folder where your file is located, then it is easy.

To go into a certain folder, type the drive name and start pressing the TAB key to go through all the folders inside it. Keep going through the cycle of folders until you get the required folder.

15. Check IP Address of Any Website

check-ip-address-of-any-website-cmd-tricks
Checking the IP address of a website with the Command Prompt

nslookup” is a Command Prompt trick that helps you to check IP address of any website.

Simply launch the Command Prompt and type “nslookup website_name” and hit Enter where website_name is the name of the website which you want the IP address for.

For example, we have checked the IP address for technorms.com by entering the command “nslookup technorms.com”.

16. Run Multiple Commands

run-multiple-command-prompt-tricks
Running Multiple Commands with the Command Prompt

This simple cmd trick will allow run multiple commands one after another using “&&” between each command. Simply type “command && command” and hit Enter.

For example, in our example, we have run “getmac && ipconfig” that will execute the “getmac” and “ipconfig” commands one after another.

17. Check Default Programs

check-default-programs-command-prompt-tricks
Checking Default Programs with the Command Prompt

If you want to know how to open certain programs with the available applications then this simple cmd hack is very useful.

For this, you have to type and Enter the command “assoc” in the Command Prompt. You will see the list of all the extensions and the programs associated with them.

18. Use this Command Prompt Trick to See all the drivers list

see-all-the-drivers-cmd-tricks
The Command Prompt lets you see the drivers list

driverquery” Command Prompt trick can be used to open the full-fledged list of all the installed drivers on your PC. Launch the Command prompt, type “driverquery” and hit Enter. You will see a list of all the drivers that are currently installed on your computer with other details like Name, Type, and Date.

19. Scan System Files

Note: To perform this cmd trick, you have to run the console session as an administrator. To run the Console as an admin, type cmd in the search bar and press CTRL+SHIFT+ENTER. It will run the command prompt as an admin.

sfc/scannow” is a quite useful cmd trick that scans the system files and repairs them right from Command Prompt. First, launch the Command Prompt and type “sfc/scannow” and hit Enter. Since the overall scan process takes some time, please be patient.

sfc-scan-cmd-tricks
Scanning the System Files with the Command Prompt

20. Change the color of Command Prompt

change-the-color-of-command-prompt-cmd-hacks
Change the color of the Command prompt (Step 1)

The default color of the Command Prompt looks quite monotonous. If you are a frequent user of Command Prompt, you may want to add color to it. This easy CMD hack will allow you add color to the Command Prompt.

Launch the Command Prompt and right-click anywhere on the corners of the cmd Window, and select Properties. Now, under Color choose your preferred color and click OK.

change-the-color-of-command-prompt-cmd-hacks
Change the color of the Command prompt (Step 2)

21. Check Network Info

get-network-details-cmd-hacks
Checking the Network Information with the Command Prompt

ipconfig” is the most used and helpful cmd trick to get all the details about your Network. Type “ipconfig” in the Command Prompt and hit Enter. You will see all the required information of your network including Media State, IP address, Subnet Mask, etc.

22. See the command history – with this Command Prompt Trick

By using this command, you can track the command history of the current session. This cmd trick can be useful when you want to have a go-through of all the commands that you have used recently.

Simply type “Doskey/History” and hit Enter. All the commands that you have used recently will be on the Command Prompt Window.

Conclusion

Although there might be “n” number of Command Prompt tricks that are useful, we have filtered and tested on these tricks on Windows 10. Do share your experiences with us in the comment boxes below.

Further Reading: The Windows 10 Command Prompt Comes With Customization and other Options