12 Userful Command Prompt Tricks

Hi! Welcome to WebTech blog, remember Windows Command Prompt (the command line interpreter) ? same old black and white boring interface. We can make it fun too.

OpenClipart-Vectors / Pixabay

Color

You can change Color of Command Prompt Application. Just write help color on the command prompt. Provide your background and foreground color combination and you are ready to go. Is’nt it interesting?

Easy Navigation to Folder

Sometime navigation to deep sub directory is quite cumbersome, here is one easy option. In windows Explorer just go to the desired folder and in address bar just write CMD , wow! you are command prompt with desired folder itself.

Prompt

Normally your command prompt will C:\Users\YourUserName, boring, wanna change? yes you can just write help prompt, you will find plenty of options and you can change the prompt.

Change Title

Generally Title of the Command prompt shows cmd command path, you can change the title. Just write Title  [your desired title] and you get various options to change the title. Example :

Type Title My Console and then press ENTER

Command History

You can use Up Arrow and down arrow to navigate through your previous commands. But do you know, pressing F7 can provide you complete commands menu and option to execute any of the previous command.

Copy Paste

You copy paste the screen content using Select All and copy and paste. But do you know, if you want to just output of specific command , how would you do. Use pipes. for example  dir | clip will store directory information into your clipboard, you can paste it into any application. Don’t believe, try yourself. It applies to any command output.

List of all Installed Applications

If you want to know, how many applications are installed on your PC, just write

Type wmic product get name  and then press ENTER

It will take some time, but will provide you list of all the applications installed on your PC. wmic commands can provide lot of information. Type help wmic and you will get all details.

List of all Installed Drivers

Similarly you can use driverquery command to get list of all drivers installed on your PC. Example:

Type driverquery  and then press ENTER

Command Prompt Function Keys

Do you know all command prompt functions keys value, here are the information :

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 ^Z to the prompt
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

Using Multiple Commands

You don’t have to wait for a command to finish processing before you could add another, you can easily enter multiple commands and they will be executed one after another. You can use multiple commands by adding double ampersand (&&) for example

Type ipconfig/all && netstat  and then press ENTER

will execute both command simultaneously and output will be shown immediately.

Network Info

This one you must have used often, you can get your network information just typing ipconfig /all . but do you know, you can get IP address of any website on command prompt, just typing nslookup website   e.g. nslookup jitu.info . Interesting ?

PC Energy Efficiency

You can get your PC’s energy efficiency report just by typing powercfg /energy  , You should open command prompt program as local administration , then only powercfg will execute. powercfg will generate the html report and provide you link for viewing. Similarly you can have better information by typing powercfg /batteryreport 

Shutdown and Restart

To shutdown and restart your PC at command prompt use

shutdown /help command

If you are network administrator, you can shutdown and restart PC remotely using following commands

Type shutdown /[r|s] /m \\ComputerName /c “Comment” /d [u|p] <xx>:<yy> and then press ENTER

get more information by typing shutdown /help command.

Hope you liked the article, Keep visiting the blog for more informative articles. If you have any comment, suggestions and criticism , please feel free to write in the comments .

 

Jitendra Chaudhary
Follow me
Latest posts by Jitendra Chaudhary (see all)
I hope you would find above article informative and  interesting. In case you need any further information, please feel free to comment , I shall try to reply the comment at the earliest. If you like this article, please like my Facebook page and advise/suggest me for more topics of your interest. Happy Coding!