Saturday, June 3

Command Prompt Tricks: Best 15 CMD Tricks And Hacks You Might Not Know

Command Prompt Tricks: Best 15 CMD Tricks And Hacks You Might Not Know

Command Prompt Tricks: 10+ CMD Tricks And Hacks You Might Not,list of top best cmd tricks and hacks command prompt tricks,Best CMD commands used in hacking,list of top best cmd tricks and hacks command prompt tricks ,What are some useful command prompt tricks?,Some Windows command line tricks you may not know?
Command Prompt Tricks: Windows have its most useful and powerful tool in the form of Command Prompt but it is not so common is use. As in the modern times most of the operating systems are running on fancy GUI , using command prompt might sound like old school. But i bet you what, after reading these cmd tricks and cmd hacks, you won’t feel the same. Writing commands might look like a tedious work but using cmd , you can easily get some tasks done with single line commands.
So here i will be providing you best of the command prompt hacks and cmd tricks which will be very useful.
First of all, for those who don’t know how to open command prompt, just go to Start menu and search for cmd and click on it. It will open Command Prompt Window.

CMD Tricks: Best Command Prompt Tricks And Hacks:

Here i have mentioned 15 best cmd tricks and command prompt hacks.

1. Get help on commands :This can be very helpful among the command prompt tricks for newbies who don’t know much about writing commands in cmd and what is the use of some specific command. With the help of this trick, you can easily get information about almost every command you type in command prompt.
Get Help On Commands

Get Help On Commands
To get help about any command , just type “/?” at the end of the command for which you need information and press Enter.
For example , if you want info about ‘ipconfig‘ command then just type “ipconfig/?” and press Enter.
It will show the info “The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.” and also show some examples as shown in the above picture.

Recommended Posts:

2. Checking IP Address of any Website:
Command Prompt Tricks
Command Prompt Tricks
This is one of the cool trick among command prompt tricks. You can use “nslookup” command to see IP Address of any website. You just have to use website name after nslookup command and you will get IP Address of the website.
For example: Type “nslookup” to find its IP Address.
3. Compare two text files:If you want to see the difference between the content of two text files then you can compare text files using this command prompt trick. It may not be as effective as some specially designed file comparison tools available but it is worth giving a try.
Compare txt Files
Compare txt Files

You need to use 
FC Command for this purpose. Just type FC command and enter the location of both the files.
For Example: If there are two files TextDocument1 and TextDocument2 and you want to compare them then you just have to put command the following command
“fc D:\\Textdocument1.docx D:\\Textdocument2.docx” 
“D:\” is directory where both the text files are located.
If the files used for comparison are similar then running the above command will give message “no difference encountered otherwise it will show the content of both the text files in command prompt itself.
4. Enable Copying from Command Prompt :You can not directly copy some data from command prompt just by using Ctrl+C. It is actually a bit different in command prompt but it is not that difficult. You just have to right click anywhere on the command prompt windows and click on “Mark”. Now you can select the text you want to copy and press Ctrl+C.
Enable Copy From CMD

Enable Copy From CMD

Note: For Windows 10, copy paste, Ctrl+C and Ctrl+V commands are already enabled. So if you are using Windows 10 then you don’t need to follow above process for copying text from command prompt, which is not the case of previous versions of windows like Windows 7.
5. Save Command Output to a File:
If you have run some command in command prompt and for future reference, if you want to save its output to text file then its very simple to do.
You just have to add “>(directory of destination\TextFileName.txt)” at the end of the command you are executing.
Save Output To Text File

Save Output To Text File

For Example: If you want to save output of ipconfig to text file then you just have to type “ipconfig > D:\IPDetails.txt” , it will create a text file in D drive named “IPDetails“.
6. Get Drivers List in PC :

Drivers List with CMD
Drivers List with CMD

If you want to see the list of all drivers it can be done with a single command in command prompt. you just have to type 
“driverquery” in command prompt and press Enter. After a short time, your command prompt screen will display all the drivers installed in your computer along with the information like Module Name,Display Name,Driver Type and Link Date.
7. Execute Multiple Commands :

Execute Multiple Commands

Execute Multiple CommandsYou can easily execute multiple commands sequentially by providing all the commands at same time and putting “&&” between them.
For Example: If you want to get IP Address and MAC Address for your PC then you can just type “ipconfig && getmac” and both commands will run one after another.
8. Access Previous Commands
If you have to use previously used command in a session then you don’t have to type it again.It is one of the very useful cmd tricks which will save you some time. You just have to press Up and Down arrow keys on your keyboard to switch through all the commands which are already executed. F8 key can also be used for the same purpose.
9. Change Command Prompt Color
If you are fed up with the default white text and black background color then no need to worry, it can be easily changed.
Right Click on the top of cmd prompt window and go to Properties.

Change CMD Color
Change CMD ColorJust go the Colors option and there will be options to change color of text as well as command prompt windows background. But these changes will remain only for that particular session. If you close command prompt and start a new session then text and background color will reset to default colors.

Recommended Posts:

Cool Notepad tricks and Cmd Codes

Helpful CMD Tricks and Tips to become Power User

Command Prompt Tricks: Best 15 CMD Tricks And Hacks You Might Not Know

10. Run Commands as Administrator:For some specific tasks, Command Prompt is required to be run as administrator. For doing this you just have to right click on cmd icon which you can easily find by searching cmd in ‘Search programs and files’ and click on “Run as administrator”.
cmd tricks

11. Create your own WiFi Hotspot:
This is one of the best among command prompt tricks. You can simply create your own WiFi Hotspot to share your desktop’s internet connection with few lines of commands in cmd. You don’t have to install some Software to use Hotspot on your PC.
Just Enter the following command in command prompt.
”netsh wlan set hostednetwork mode=allow ssid=Hotspotname key=password”where Hotspotname and password you can enter with your choice.
The above command will create a Hotspot but it currently in offline mode.
To Start: Type ”netsh wlan start hostednetwork” in command prompt and Press Enter.
Now you have successfully created your own WiFi hotspot.
To Stop : Type ”netsh wlan stop hostednetwork” in the command prompt and Press Enter.
12. Hide Folders Using Command prompt:
There is one easy way to hide folders using folder properties but that method is not useful, as it has become very common and hidden folders can be easily accessed by changing view options to Show hidden files and folders. But using this below mentioned command prompt trick you will be able to completely hide the folder and the folder won’t be displayed by the Explorer.
Follow these simple steps to hide folder using this cmd tricks:
  • Open Command Prompt and go to the directory where the folder you want to hide is created.
  • Type “Attrib + h + s + r target_folder_name“, where target_folder_name is the name of the folder you want to hide and press Enter.
  • You can check now that folder is hidden.
  • To unhide the folder, just type command “Attrib – h – s – r target_folder_name
  • To  view or access the hidden folders you can use the command “dir/AH
13. Change Title of CMD Window:
When you open command prompt you must have noticed that on the title bar of the command prompt windows something like C:\Windows\system32\cmd.exe or similar is written. If you are working on different tasks using command prompt in separate cmd windows then the default title may confuse you while switching to different cmd windows. You can ease this by assigning different names to different cmd windows by using this simple command prompt tricks.
  • Launch command prompt and type title title_bar. Replace title_bar by your desired Title Bar name.
  • Press Enter and you will notice that title of your command prompt windows has changed to your desired name.
It will remain as your desired name for current session only. once you quit the current cmd session it will be back to the default title name.
14. Changing The Prompt Text:
When you start a session in command prompt, the default prompt text is like C:\Windows\system32 which is a bit boring to see every time. CMD Prompt text shows the working directory in which you are working currently.
Well if you want to customize that also then it can be done easily using this CMD Prompt Trick.
Cmd prompt tricks
  • Launch command prompt and type prompt “your desired text”$G and hit Enter.
    Do not put the text with quotes.

  • It will reset to its default text when you close the current session and start a new session.
  • If you want to reset prompt text in the existing session itself then just type prompt and hit Enter.
15. Watch ASCII Version of Star Wars:
This trick is very cool and awesome among the many CMD Prompt Tricks. Using the trick you can watch ASCII text version of movie Star Wars, inside your command prompt windows itself.
Use these simple steps.
Star war trick

Previous Post
Next Post
Related Posts