22 Best Command Prompt Tips and Tricks To Know

22 Best Command Prompt Tips and Tricks To Know

Command Prompt is often discussed in major Windows 10 tutorial posts and videos. With the attractive Windows 10 interface, there comes a command line interface too that is knowingly or unknowingly ignored by most of us. The users can forget, but not Microsoft. From time to time it keeps on improving its important tools just like Command Prompt.

Yes, you heard it right, Command Prompt is a powerful tool and its amazing tricks make it more useful. For a general user, Command Prompt and many of its commands seem boring but for anyone who has wisely used cmd commands very often; this tool has much more to fall in love.

It is said that there are a lot many things about cmd commands that are left unknown, and they are even not available in the GUI of the Windows 10 OS. Therefore, in this article we will be showing you some known and unknown Command Prompt commands that you cannot miss to know.

Let’s have a look!

Command Prompt: Tips and Tricks 2020

1. Command History

History can help us regain or memorise a cmd command that we have used in the past. To track down the command history use the following command:

Type: doskey/history

Command history

2. Run Multiple Commands

Do you want to run one after other commands? If it is, you can add your required commands to your collection of cmd hacks. What you need to do is, you have to mention ‘&&’ between each command and save your time. For instance, you want to run ‘ipconfig’ and ‘paint’ together using command prompt, you’ll use the following command:

Type: ipconfig && mspaint

Run Multiple Commands

3. Abort a Command

Do you want to abort any command you have recently made? Yes, any command can be stopped in its tracks using Ctrl+C. This is helpful when you have initiated a command line and you want to stop it. Remember, Ctrl+C keys are not a magic wand that can undo all the things, even the ones that are undoable. For instance, like Format command. But, abort command us an excellent Command line if you want to stop any command there and then.

Press Ctrl+C to abort command.

Command Prompt Keyboard Shortcuts

Tab: While typing a folder path, Tab key will auto-complete and cycle through directories.

Ctrl+M: Enables Mark Mode to move your cursor in directions with arrow keys.

Ctrl+C: To copy anything around the operating system.

Ctrl+V: To paste anything from around the operating system.

Ctrl+F: Search for text within the Command Prompt.

Ctrl+Shift+Scroll on your mouse: Increase/Decrease the window transparency.

Alt+Enter:To enable full-screen mode with no title bar on the top. Also you can use F11 for the same.

4. PC Driver List

Command Prompt commands can be used to see all the drivers installed on your Windows PC. All you need to do is run the ‘driverquery’ command line and you‘re done. Once you type in the command and press Enter you will see a list of active drivers with name, type and other information.

Type: driverquery

PC Driver List

5. Use Function Keys To Be A Pro User

The function keys on your keyboard can do a lot more in the Command Prompt. It is one of the best kept and lesser known secrets about this tool. Here’s what these keys can do:

  • F1: Pastes the last executed command (character by character).
  • F2: Pastes the last executed command (up to the entered character).
  • F3: Pastes the last executed command.
  • F4: Deletes current prompt text up to the entered character.
  • F5: Pastes recently executed commands (does not cycle).
  • F6: Pastes an end-of-file-character Ctrl+Z at the insertion point.
  • F7: Displays a selectable list of previously executed commands.
  • F8: Pastes recently executed commands (cycles).
  • F9: Asks for the number of the command from the F7 list to paste.
  • Alt+F10: Deletes all macro definitions.

6. Save Output To Clipboard

Very often it happens that you need to save something out of a command and you usually follow the tactic of copy and paste. However, you can simply do it by entering a simple command. The command’s output can be sent to the Windows clipboard directly. Here’s how to save the output to clipboard:

Type: ipconfig | clip

7. Change The Color Of Command Prompt Window

You know, you can change the color of the Command Prompt window to make it more exciting and engaging. Shift from its black color and give it the color of your choice. Wondering how? Windows allows you to customize cmd window by changing its colors as per your requirements and make things more intriguing. To change the color:

  • Press Win+R to start Command Prompt.
  • Right-click on the title bar and click on Properties.

Change Color of Command Prompt Window

  • Click on the Colors Choose the background and text color, adjust transparency and that’s it.

Choose the background text color

  • Click OK to apply the changes.

8. Change The Title Of The Command Prompt Window

When you launch Command Prompt, you see the title bar reads Command Prompt or Administrator Command Prompt. If you want, you can change the name of the cmd window you open. This makes it convenient for you to work on multiple command line windows at a time. You can name each one of them separately and manage them accordingly. Yes, you can change the Command Prompt window name using amazing command line tricks. To change the title:

  • Open Command Prompt and type ‘title’.
  • Enter the name of the ‘Title Bar’ you want to see.
  • Hit Enter and you’ll see the title of the cmd window is changed according to the text you’ve entered.

Change the title of command prompt windows

  • The title of the cmd window is temporary. It is limited until you exit the Command Prompt

9. Create WiFi Hotspot

Do you know, you can create a WiFi hotspot directly from your Command Line. To execute this, you need to first make changes to some settings like-

  • Go to Control Panel > Change Adapter Settings under Network and Sharing Option.
  • Then, click on the Connection you’re using and click Properties.
  • Locate the sharing tab and check the option ‘Allow other networks to connect through this computer’s internet connection’.

Open Command Prompt with administrator account and enter the following command:

Type in: netsh wlan set hostednetwork mode=allow ssid=Yourhotspotname key=yourpassword

Open Cmd Prompt by Administrator account

Once enabled, enter netsh wlan start hostednetwork to start the WiFi hotspot. To stop it, type in netsh wlan stop hostednetwork“.

Read: Tricks To Manage Wireless Networks Using Command Prompt

10. Scan Systems For Any File Problems

Command Prompt also gives you an accessibility to check for any problems in the files stored on your Windows PC. For instance, you can check for any missing or corrupted files using this command and also fix them. To scan system using cmd commands:

Type in: sfc /scannow

Scan System

Additional Tip:

If you’re using Windows 10, you can use Advanced System Optimizer to maintain the performance of your PC. This is ultimate software that not only removes junk from your Windows PC but also provides its users with the best solutions towards malware protection, driver updates, disk optimization and RAM cleaning to boost-up PCs performance.


11. Fix Issues With DNS Resolver Cache

DNS is an important component that cannot be ignored while connecting to the Internet. Your computer maintains local DNS resolver cache for faster connectivity of websites. There are times when cache is corrupt and you are no longer able to access your favourite websites. If you face such a case, you can use this cmd command to save the day. To fix any issues with DNS resolver cache:

Type in: ipconfig /flushdns

Fix issue With DNS

Also Read: How To Enable DNS Over HTTPS In Your Web Browser

12. Speed Up Internet Using Cmd Command

Command Prompt is a greatest of all Windows tools and lets you sort everything within. To speed up the internet connectivity using cmd command. We have listed some tweaks above in this article like DNS resolver cache, Wi-Fi connectivity etc. Likewise,  to speed up internet you can use the command line below:

Type in: netsh int tcp

Speed Up Internet using Cmd

Important Tip:

Use Systweak VPN for improved security and speed. It provides you with awesome features such as ultra-fast streaming, strong protection, hides IP address, etc. Know more about Systweak VPN, click here.

Download Systweak VPN Here

13. View A Command’s Results One Page Or In One Line

Many times we come across cmd commands that cover the entire page while displaying the results. The command lines like dir command produce so much information that is so difficult to understand and seems useless. For such times, you can always use the command and follow it with the pipe character and then more command.

For instance dir /s | more.

View Command Results

This will generate thousands of lines of results, but using the More command will pause each page’s result with –More– at the bottom. Now, press Spacebar or press Enter to advance by one page or one line at a time.

14. Get Help From Any Command

 The help command does not provide help for all cmd commands but any command suffixed by /? can display detailed information about the particular command’s syntax. The help command may not be the best and coolest trick, but it is one of the most useful command lines. To know more about the cmd command,

Type in: /? ahead to any command as a suffix

15. Shutdown or Restart Your Computer

Yes, Command Prompt lets you shutdown or restart your computer. It is one of the easiest ways to execute shutdown, also you can shut down or restart another computer on your network using the Command Prompt. Type in /ito execute and open the Remote Shutdown dialog box. There and then you need to enter the name of the remote computer and choose what you want to do (restart/shutdown), then click OK.

Even you can strictly shutdown or restart another computer with the shutdown command without using the Remote Shutdown Dialog. The command follows the following syntax:

shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/f] [/m \\computername] [/t xxx] [/d [p:|u:]xx:yy] [/c “comment”] [/?]

Each one has a different role, you can check them out here.

16. Map A Local Folder Just Like A Network Drive

Command Prompt on Windows 10 helps its users in many ways and likewise the net use command is used to assign shared networks. There is one more command that can be used to find any folder on any of the local hard drives. This command is known as the subst command. Execute subst command, followed by the path of the folder you’re looking for.

For instance, you want c:\windows\fonts to appear in a new Z: drive. Follow the command line below to make the changes

Type in: subst z: c:\windows\fonts

If you want to delete this newly created drive, you can simply enter subst /d z: command line.

Map A Local Folder

17. Auto Complete Commands With Tab

It is quite easy and the most useful commands, you can auto-complete your cmd commands using this trick. Here, you just need to enter the portion of command and then press Tab until you find your path. You can also use Shift+Tab to step through the results in reverse order.

18. Hide Folders Using Command Prompt on Windows 10

Well, there’s always an alternate way to do things on Windows 10 and likewise you can use Command Prompt to mark a folder as Hidden. Usually you can do this by using the properties pane of the folder and check mark the checkbox that says Hidden. To do the same using Command Prompt, launch cmd using Win+R and navigate to the directory where your target folder is located. Now, type in: Attrib +h +s +r folder_name and press Enter.

To unhide the folder, use the following cmd command:

Type in: Attrib -h -s -r folder_name

19. List All Installed Programs

You can get a collective list of all the apps and programs installed on Windows 10 PC using Command Prompt. To do so, follow the steps below:

  • Launch Command Prompt and type in: wmic product get name.
  • Hit Enter. It will show you the list of programs installed on your PC.

To uninstall any program using Command Prompt on Windows 10, follow the cmd command as mentioned below: wmic product where “name like ‘%NAMEOFAPP%’” call uninstall /nointeractive, and hit Enter.

20. Generate Battery Health Report Using Cmd Commands

We haven’t ever imagined Command Prompt to be such a useful tool but yes it can do wonders for Windows 10 users. It helps us to quickly locate and take actions regarding files and folders. We can  use Command Prompt to generate a report about the stats like factory specs, full battery capacity etc. using cmd commands. Follow the steps below to execute:

  • Launch Command Prompt as an Administrator.
  • Type in command line: powercfg/energy.

  • It will take 60 seconds to analyze and then generate a report in an HTML document.

To access the report later, you can find it in C:\Windows\system32\energyreport.html

21.  Quick Fix Commands For Connection Issues

If you are facing any troubles with your connections, you can use ipconfig some go-to commands to resolve the issue.

ipconfig /release (Releases your currently issued local IP address)

ipconfig /renew (Requests a new local IP address)

ipconfig /flushdns (Resets the contents of the DNS client resolver cache)

22. View a Drive’s Entire Directory Structure

Last but not the least, Command Prompt lets you create a kind of map of directories on your computer drive. For this, you need to execute tree commands from any directory.

Drive's Entirly Data Structure

Wrapping Up:

Command Prompt for Windows 10 can be used for many other useful hacks and is a great way to quickly take actions for your Windows PC. We hope we served you better in this article. There are many hacks and we might have missed out on some, let us know your requirements, we’ll try delivering the best from our end.

Were we helpful? Let us know in the comments below.

Quick Reaction:

Leave a Reply

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