Becoming a master of the Windows operating system is no easy feat. Given that the latest iteration–Windows 10–has become extremely accessible, one might expect that it would be simple to learn all of the commands and other programming tricks to turn you into a power-user. Perhaps fortunately, the Windows command prompt still allows for all kind of digital maneuvers that will help you to better work in Windows. In the following article, we’ll introduce you to 15 of our favorite command prompt tricks, hacks, and codes that you can implement immediately. Keep in mind that some of them will be a little risky to use, but what useful knowledge has ever come without a little bit of risk?
Time to roll up our sleeves, and dig into Windows!
For most users, Windows is a rather simple thing to use. The majority of your activity can begin in your taskbar and Start menu, branching off from there to perform the tasks that you need. Launching browsers, music apps, games, and other software is a matter of double-clicking, not menu diving.
However, if you know anything about using the command prompt built into the Windows operating system, you know that it can give you quite a lot of additional functionality to an already robust operating system. Is it daunting? Sure! Most users don’t have any idea how to manipulate the command prompt. But when you do learn, it’s important to know that you don’t have to figure it all out at once.
After all, that’s the purpose of this article, right? We’re not out to show you every single, little thing that you can possibly do with the Windows command prompt, but we are going to show you some of the most useful tricks. You might not be able to make use of them through your constant use of Windows, but we can promise they’ll add a bit more to the experience.
We’ll start out with some baselines stuff–simple things that you should know about using the Windows command prompt before you move on to more complicated tasks. Some of them might even be able to be pulled off outside of the command prompt…but what fun is that? Once you know how to use a new thing, part of the enjoyment comes from using it as often as you can!
Two more things before we get started. First, make sure that you’re confident about what you’re doing before you enter any odd-looking commands. All of those that we’re using are safe, and won’t cause any harm or changes to your operating system installation. However, once you get to looking for more of them, online, you’ll see that there’s quite a lot you can do from the command prompt, including some that can make changes to the way Windows works.
Second, we owe our readers a disclaimer. We’re not responsible for anything that happens to your operating system, while you’re using the command prompt. Our tips and tricks are tested, but they have to be performed exactly. Don’t worry; we’ll be specific with our instructions! However, as we said above, it’s important to know what you’re trying to do, and what a particular command will accomplish before you run it. Also, if you want these to be guaranteed to work, we recommend upgrading to Windows 10–the newest version of Microsoft’s operating system.
15 Best Command Prompt Tips & Tricks
In Windows 10, the command prompt has become easier to use than ever before. Though it can still be used to control the Windows operating system, it has also grown to interact with the surface-level function of the operating system more than ever before.
As you’ll see in the coming list, you can even drag-and-drop files right into the command prompt from your desktop or file directory, in order to learn more about them.
Use Ctrl + C to End Any Command
From within the Windows Command Prompt, you have the power! Of course, that power is limited to what you’re doing within the operation itself. Since all of your actions within the Command Prompt take the form of commands (duh!) it can be helpful to know how to abort one that you don’t want to complete.
If you haven’t run the command–and have only typed it out–you’ve nothing to worry about. Just backspace to erase it. However, if you execute a command and then second-guess yourself, you can press Ctrl + C to abort the command before it finishes.
Run the Command Prompt as an Administrator
Some commands can’t be run unless you’re operating as your computer’s administrator. Fortunately, this is easier to do than it might sound (and you can use it when starting up other programs, as well!)
Before running the Command Prompt, right-click it and select Properties. Under the Compatibility tab, find and select the checkbox next to “Run this program as an administrator.”
Voila! Every time you run the Command Prompt, you’ll now be in administrator mode.
Use the Function Keys in the Command Prompt
One of the first things that you can learn if you want to be a Command Prompt master is the use of the Function key row (F1-F12) in controlling operations.
- F1 – Pastes the last command that you executed (one character at a time)
- F2 – Pastes the last command that you executed (up to the last character you entered)
- F3 – Pastes the last command that you executed (in total)
- F4 – Removes the text from your current command up to the last character you entered.
- F5 – Pastes in your recently entered commands
- F6 – Enters ^z into the prompt (which indicates “end of file”)
- F7 – Opens a window with a selectable list of previous commands (it can be cleared by pressing Alt + F7)
- F8 – Cycles back through previous command prompts (if you type the first few characters of a command, you can limit the cycling to commands that match them.)
- F9 – Prompts the user for a number from the list of command prompts (displays in the F7 menu)
Now, some of these might only be of use to those with a more advanced understanding of the command prompt, but here they are! They make navigating commands quick and easy, especially when you’re working with similar commands over and over again.
Get Help for Commands
This one’s simple. If you come upon any command that you don’t know the purpose of, slap a /? to the end of it. Almost every command in the Windows command prompt can be triggered by this “help switch” that will assist you in knowing what a particular command does.
Easy, right? This can be your best friend in helping to learn the Windows command prompt.
View a Storage Drive’s Directory Structure
In order to display the drive structure of any folder or file, you’re going to need to run a tree command. Before we can do this, however, you’re going to need to know the specific path to the directory that you’d like to display. For example…
This will display an entire directory structure of the “Documents” folder in a particular user;s instance of the Windows operating system. The results can be fairly complicated depending on the size and breadth of a particular drive structure, so be mindful of what you ask the command prompt to do!
Use the Command Prompt as a Reference
Most of the time, users copy and paste pretty much anything they want. They either right-click an object or selection of information and select “Copy,” or they use the keyboard command Ctrl + C.
Things aren’t so easy within the Windows command prompt, though you can still copy and paste pretty much any data that you’d like to. It simply requires a different set of commands that happens to be just as simple!
From within the command prompt, right click and select Mark. It doesn’t matter where you click. After selecting the “mark” option, highlight whatever you’d like to copy and press Enter.
You’ve effectively just copied the text, and can now paste it into any word processor or entry form that you’d like. Right click and select Paste or use the keyboard command Ctrl + V.
Open the Command Prompt Wherever You Want
Because the command prompt is baked into the Windows operating system, you can access it from practically anywhere. This is especially useful when you’re navigating specific drive directories within your computer’s hard drive.
From within the Windows file explorer directory that you’d like to work from in the command prompt, hold shift and right click. This will bring up the usual selection of options, in addition to “open command window here.” Click on this, and you’ll open the command prompt from within the specific directory that you’re already in!
It’s a simple thing, but it saves some legwork.
Save the Command Prompt’s Output
Want to save the results of your Command Prompt activity? This is also pretty easy, but it’s not so simple as the copy and paste process that we described above.
For this, we use redirection operators (specifically the >, and >> symbols.) Attaching these to the end of a command–and then pointing to a writeable document–is a great way to make sure that you’re able to keep a record of what you’ve been doing in the Windows Command Prompt.
Admittedly, this is a trick that’s more useful for people who are performing complicated commands. Great for diagnostics, but less so if you’re still learning the ropes!
Find Your IP Address & More
In truth, you can find the IP address of both your computer and your router. Within the Command Prompt, type ipconfig.
The IP address displayed under “Default Gateway” is your router’s address. The one displayed under IPv4 address belongs to your computer!
Run a Traceroute
Occasionally, analyzing the traceroute on your internet connection can help you to diagnose problems in your TCP/IP connectivity. Other times, it’s simply handy to know how to do it, considering that it can help you to better understand how data is transferred online.
From within the Command Prompt, type in tracert “hostname” (in this instance “hostname” will be the name of the server that you’re attempting to connect to, and will also be absent the quotation marks.)
If you’re having trouble connecting to a particular service or server, this is a great way to diagnose where the actual disruption is coming from.
Easily Find Any File or Folder Path
This one is easier than you’d think. If a particular command requires you to know or type an entire file or folder path, you can circumvent it all with a little bit of drag-and-drop.
Using the Windows File Explorer, navigate to the folder or file in question. Then, drag the file or folder into the Command Prompt and let go. Watch in utter awe as the complete path is displayed right in the Command Prompt!
Reset your IP Address
If your computer has difficulty configuring your IP address–a common problem for some home wireless networks–you can reset your IP address from the Command Prompt.
First, type in netsh interface ipv4 config to display your current list of network diagnostics in use. You’ll need to locate the particular network connection that you want to modify, as well as its correlating IP address. All of this can be found using the above command.
Once you have it, you’re ready to continue. For our example, we’ll pretend we’re modifying a network connection labeled “home WiFi.”
Enter the following command: netsh interface ipv4 set address name=”home WiFi” static IP_Address. In this example, replace “IP_Address” with the correct IP address of your network location.
Flush your DNS Cache
This one is easy, and can also be useful in helping to resolve internet configuration issues. Within the Command Prompt, enter ipconfig /flushdns. That’s all there is to it!
It helps to resolve some connectivity problems be clearing the cached DNS information compiled by your computer.
Navigate Previous Commands with the Arrow Keys
In a word processor, your arrow keys allow you to move through lines of text. Within the Command Prompt, they allow you to cycle through previously used commands. Simply press up and down to display previous commands that you’ve used within the Command Prompt.
This is particularly useful when you’re using commands that are several characters long, especially if you’re prone to typos!
Quickly Tab Through Available Command Paths
As we’ve illustrated above, you’ll occasionally be using lengthy file and folder paths within the Command Prompt, which must always be typed out in their entirety. While you can drag and drop individual files and folders right into the Command Prompt itself, there’s also another quick way to complete those long lines of text.
After typing in the command that you’re going to enter, type in as much of the file path as you know. Then, press Tab until you find the correct file or folder. You can continue pressing Tab until the right one shows up, too!
How’s that for a quick primer to Command Prompt mastery? These 15 tricks, hacks, and codes for the Windows Command Prompt can turn you into an operating system productivity master with enough practice, so put them to use, and let us know how they work out by chiming in through the comments, below!