Windows CMD Commands You MUST Know: Microsoft has deliberately driven the command line aside in the Windows interface.
The reason for this is that the command prompt program is antiquated, and a mostly unnecessary tool from an era of text-based input that has long passed. However, there are still some useful commands that remain beneficial for all Windows users.
The command line (CMD) is not as useless as one might assume.
Most of the time, Command Prompts might be a little complex, but they make manual tweaking merely a single task. Usually, the users of the Command Prompt will be aware of its importance and understand how powerful it really is.
This might be the reason people don’t mind learning tricks or commands to take care of some important Windows tasks in a snap. It is worth saving a bit of time every day by learning at least the basics of CMD.
So, we have compiled a list of good and useful Windows CMD commands and tricks that may help you be more productive. Whether you’ve just begun using the Command Prompt or you are a frequent user, you should be able to find a trick to ease things up a bit. If you’re not sure how to access the command prompt or would like to see a list of each command, refer to our novice guide to Windows CMD commands for instructions. Here are the most useful commands every Windows user needs to know.
What is the Command Prompt (CMD)?
The Command Prompt (CMD) program is one of the most powerful programs for your Windows PC. You can control your whole PC by making use of this tool.
WARNING TECH GEEKS
YOUR INFORMATION IS EXPOSED
Your location is: Princeton, NJ
Your current IP address is: 2001:4455:2f7:b700:f880:7bad:b46b:1768
You can stream and download anonymously through your PC, Mac, Android, and iPhone through IP Vanish.
I have compiled a list of the top Windows CMD commands that work on your Windows 7 or Windows 10 PC. By learning these commands, you can quickly launch programs and do your work much faster.
19 of the Most Useful Windows CMD Commands You MUST Know
1. Make your Command Prompt Transparent in Windows 10
Make your Command Prompt Transparent in Windows 10 without the need of downloading any software on your PC. This is the latest unique feature in Window 10. You just need to open the command prompt properties for enhancing your command prompt opacity. Try this trick in your Windows PC and give your computer a stylish look.
Step 1. First, open the Command Prompt in your computer.
Step 2. Open CMD Properties on your PC.
Step 3. Choose the Colors section in Command Prompt Properties. Now change the opacity value for your command prompt’s transparency.
Step 4. This way, you can make your command prompt transparent.
2. Copy data from the Command Prompt
- Usually, to copy data we use Ctrl+C, but when it comes to the Command Prompt, the process is different.
- It’s not hard, just right-click anywhere in the window and click onMark from the menu.
- After that, just select the text you want to copy and hit Enter to copy it.
Note: In Windows 10, Ctrl+C and Ctrl+V commands to copy/paste have been enabled in the Command Prompt. If you are using Windows 10, you don’t need to follow the above process. Also, in Windows 10, keyboard shortcuts for CMD are enabled by default which wasn’t the case in previous versions of Windows.
3. Check the IP address of any website
You can see the IP address of any website just by entering nslookup command along with the name of the website. For example, you can type “nslookup website name” to find its IP address.
4. Use QuickEdit Mode
The Command Prompt comes with a QuickEdit Mode that helps you instantly copy and paste content with just a right-click. In QuickEdit mode, you can highlight content and right-click to copy it, or right-click in a blank area to paste content from your clipboard.
- To enable QuickEdit Mode, right-click on the top of the Command Prompt interface and select Properties.
- In the properties, check the box next to QuickEdit Mode to enable it.
- Later, you’ll need to disable it.
In fact, whenever you delete files on a mechanical hard drive, it doesn’t actually delete them at all. Instead, it marks the files as no longer accessible, and the space they took up as free. The files remain recoverable until they’re overwritten with fresh data, which might take some time.
However, the cipher command can be used to wipe a directory by writing random data into it. To wipe your C drive, for instance, you’d use the command cipher /w:c, which will wipe free space on the drive. The command does not overwrite undeleted data, so you will not be wiping out files you need by running this command. There’s a host of other cipher commands, however, they are generally redundant with Bitlocker enabled versions of Windows.
6. Get help on almost every Command
This trick is very beneficial for beginners. However, advanced users may learn few things as well. You can quickly get information from almost every command you provide in the Command Prompt. Such information includes complete details of what a command does and what processes are used, and it may even show a few examples.
To get this help, simply type /?at the end of the command for which you want information. For instance, you can type ipconfig/?, and you will get all the information.
7. Open the Command Prompt From Any Location
If you’re very accustomed to the Command Prompt program, then you know that it can be really annoying executing the cd/chdir command over and over again to get to the right directory you want to work from. Fortunately, there’s an amazing Command Prompt trick that will allow you open a Command Prompt window from whatever folder you’re viewing in Windows.
- All you have to do is simply navigate in Windows to the folder you wish to begin working from in the Command Prompt.
- Right click on any folder, holding the Shift button. Hit on open command window hereand you will be able to open the command prompt from that location.
- If you’re a Command Prompt power user, you’ll certainly understand the importance of this little trick.
8. Ping Command
It is necessary to identify and verify whether the packets that you send are reaching the appropriate destination or a specific networked device. That’s where ping comes into the picture—it’s the handiest thing.
- All you need to do is to simply type ping followed by the IP address or web domain.
- This will send a series of test packets to the specified address.
- If they arrive and are returned in a proper way, you know the device is capable of communicating with your PC.
- But, if it fails, you know that there’s something blocking communication between that device and your computer.
- This can help you decide if an issue is caused by improper configuration, or rather a failure of network hardware.
9. Save a Command to a File
If you want to save the results of a command execution to a .txt file for future reference, then it is quite a simple trick. Check it out!
- Just type add > (destination/file name with .txt extension) at the end of the command you are about to execute.
- For instance, you can type ipconfig > c:Networkdetails.txt, and this command will create a .txt file in C drive with the name, “Networkdetails”.
10. Create Undeletable Folders
You can create undeletable folders using a specific set of keywords.
- In the Command Prompt, type the name of the drive in which you want to create the folder (it cannot have Windows installed in it).
- After that, type any of these keywords “md con” or “md lpt1” and hit Enter. So, it should look something like this D: md con.
- This will create a folder with the same name that cannot be deleted or renamed.
- To delete the folder, replace md con with rd con or md lpt1 with rd lpt1.
11. Get Network Details
- You can get quick network details such as an IP address, subnet mask, or Default Gateway with a single command.
- Type ipconfig then press Enter, and you will see all the details of your network.
12. Hide Files and Folders using the Command Prompt
You can hide confidential or private files and folders with the help of the Command Prompt. These files cannot be accessed using the traditional hide feature of Windows.
- Initially, type the drive name where the folder is located. Then, enter this command Attrib +h +s +r and afterward, enter the name of the file/folder you want to hide. Then it looks 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 see the folder again, use the same process above but change the command to Attrib -h -s -r from “Attrib +h +s +r”.
13. Get a List of Currently Running Tasks
The “tasklist” command can be used to provide a current list of all tasks running on your PC. Although somewhat redundant with Task Manager, the command may sometimes find tasks hidden from view in that utility. There’s a broad variety of modifiers.
- Enter Tasklist -svc >> to view services related to each task.
- This command: Tasklist -v >> can be used to obtain more detail on each task.
- Enter Tasklist -m >> to locate .dll files associated with active tasks.
These commands are very beneficial for advanced troubleshooting.
14. Compare Two Files
There is a possibility that you can compare two text files in command prompt and check differences. The outcomes won’t be as good as third-party file comparison tools, but it is worth a try and fun to do!
- Firstly, you need to type the FC command and enter directories of both text files. Make sure that the files are in a .txt format for proper execution).
- For instance, you can type fc C:haidersample1.txt C:haidersample2.txt and press enter to get a comparison of both files. You will then get an answer of whether the files are different or identical in any way.
In the above example, here is the meaning of the command:
- “C:” is the drive where the text file is located,
- “Haider” is the name of the folder in which the text file is located.
- “Sample1.txt” is the name of the text file. Both files can be located anywhere on your PC, you just need to provide the right directory.
If both the files have different content, then running this command will show the different content. If both the files have exact same content, the command will return this message ‘no difference encountered’ as shown in the above image.
15. Watch Star Wars Episode IV
This is a remarkably cool Command Prompt trick, and despite not being productive, it is quite fun to do. You can truly watch Star Wars Episode IV right inside your Command prompt. It will be an ASCII version so don’t expect for a fully high digital quality HD movie.
The process is quite simple. Just check out the steps:
First of all, open the Command Prompt. Type this command telnet towel.blinkenlights.nl and hit Enter. The movie will start automatically without any delay.
Note: Make sure that Telnet is enabled in your PC. If you don’t have then, you can get information to install and enable Telnet from the official Microsoft website.
16. Create Wi-Fi Hotspot using Windows CMD Commands
You don’t actually need any kind of third-party apps to create a Wi-Fi hotspot to share your PCs internet. You can simply do this from the Command Prompt.
In the Command Prompt, enter the following command to enable your Wi-Fi Hotspot.
netsh wlan set hostednetwork mode=allow ssid=Hotspotname key=password
- Once enabled, you can start the Wi-Fi hotspot by entering the command “netsh wlan start hostednetwork” or stop it by entering the command netsh wlan stop hostednetwork.
- You will need to share your internet connection to this hotspot for everyone to use it.
- Go to the Network and Sharing option from the Control Panel, and then click on Change adapter settings in the left panel.
- Now, right-click on the network you are using and click Properties.
- In the properties, go to the sharing tab and check the option Allow other network users to connect through this computer’s internet connection to share your connection.
Note: Using Administrator privileges for CMD is necessary to run this command or else it will show an error.
17. Use Function Keys
You can use the function keys (F1, F2, F3, etc.) right inside your command prompt and get various results. Below are the applications of the function keys in the Command Prompt:
F1: Pastes per character last used command
F2: Enters last used command only to a specified command character
F3: Pastes Last used command
F4: Delete command only to a specified command character
F5: Pastes last used command without cycling
F6: Pastes ^Z
F7: Provides a list of already used commands (selectable)
F8: Pastes cycleable used commands
F9: Lets you paste commands from the list of recently used commands
18. Automatically Complete Commands with Tab
If you don’t know the full commands, just type the first letter and press the Tab button. When you press the Tab button, the command prompt suggests you commands to use.
So, these are some cool, interesting, and widely unknown Windows CMD commands and tricks that will definitely help you understand your PC better. I hope these tips are beneficial for you to become more productive.