Affiliate Disclosure: By buying the products we recommend, you help keep the lights on at MakeUseOf. Read more.
The Command Prompt is a Windows utility that lets you give the system instructions. It can automate tasks, troubleshoot issues, and perform all sorts of functions. We’re going to show you how to get the most out of it, including how to change the colors, execute multiple commands, get help on any command, and much more.
To open the Command Prompt, just do a system search for cmd and open the relevant result. Alternatively, press Windows key + R, type cmd into the Run utility, and hit Enter to launch the Command Prompt.
If you have your own tip to share, be sure to let us know in the comments section below.
1. Always Open as Administrator
You can run the Command Prompt in standard and administrator modes. Some commands will only work in the latter, so generally, it makes sense to just use that mode all the time.
To have a Command Prompt instance that always opens as administrator, we’ll need to use a shortcut. Do a system search for cmd, right-click the result and choose Send to > Desktop (create shortcut).
Right-click the new shortcut, click Advanced, and tick Run as administrator. Press OK twice and you’re finished.
2. Access Through Windows Key + X
If you press Windows key + X you will launch the power user menu. It gives you quick access to things like Device Manager, Disk Management, and Task Manager.
It can also list the Command Prompt, but yours might have Windows PowerShell instead.
It’s very easy to switch this. To begin, press Windows key + I to open Settings. Navigate to Personalization > Taskbar. Slide Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Windows logo key + X to Off. Now you’ll see the Command Prompt on the list.
See our guide for the fastest way to open the Command Prompt if you want to know some other ways you can open the utility.
3. Open via Folder Context Menu
Prior to Windows 10 build 14986, pressing Shift + right-click inside a folder would provide the option to Open command window here. This would then open Command Prompt with the path already set to the folder you specified.
However, this has been replaced with Open PowerShell window here as Microsoft attempts to move people away from the Command Prompt. As Windows 10 has automatic and forced updates, you have no choice in this matter. If you don’t like the change and want to add in the Command Prompt option, head over to TenForums and download their registry tweaks.
4. Copy and Paste
If you want to copy any text, press Ctrl + M to enter mark mode. Left-click and drag to highlight the text you want and press Ctrl + C or Enter to copy it to your clipboard. You can press Esc at any time if you want to leave mark mode. To paste, simply press Ctrl + V.
Think that sounds too cumbersome? Right-click the Command Prompt title bar and click Properties. Switch to the Options tab, tick QuickEdit Mode, and click OK. Now you don’t need to press anything before being able to highlight text.
5. Use Arrows Keys for Previous Commands
If you’ve entered a previous command that you want to use again, use the up and down arrows on your keyboard to move between them. This is handy if you’re repeatedly executing the same commands or want to correct a mistake in what you just submitted.
You can also press the right arrow key to enter your previous command character by character. This could be useful if you need to enter multiple commands that have the same opening.
Alternatively, press F7 to see a list of all your previous inputs, using the up and down arrows to navigate and Enter to select, or type doskey /history to output it in the Command Prompt.
6. Drag and Drop Files for Input
It can be tedious to write out a folder or file path name in the Command Prompt. You don’t need to waste the time, though, because there’s a much quicker way.
Navigate to the folder or file you want in File Explorer. Left-click and drag it into a Command Prompt window. That path will then appear. It’s that simple!
7. Get Help With Any Command
Is there a command that you can’t quite remember how to use or what it does? No problem. Just append /? to your command and you’ll be shown information about that command, like what options you can use and some examples. It works on all of them.
For example, if you want more information about the ipconfig command then input ipconfig /?. It won’t actually run the command, so don’t worry about that.
8. Use Tab for Auto-Complete
You can press the Tab key to auto-complete your command. This is useful for when you don’t know the full name of the command or to save you time. For example, rather than typing out a full file path, you can press Tab to have it automatically completed.
If what it serves isn’t what you need, just keep pressing Tab to progress through the options. Alternatively, press Shift + Tab to reverse through the options.
9. Output to a File or Clipboard
If you want to save the output of the Command Prompt you could copy it, paste it into a text editor, and then save. But you can do it much quicker and all within Command Prompt.
To do this, input your command followed by a > and the file you want to output to. For example, to output your ipconfig to a text file in my Documents, I would input ipconfig > C:\Users\Joe\Documents\myinfo.txt.
You can also output to your clipboard, ready to paste elsewhere. To do this, input your command followed by | clip. For example, ipconfig | clip.
10. Cancel a Command
If you’ve submitted a command that you want to stop, just press Ctrl + C. This will end the command up to the point that it’d go to. This means that it won’t reverse what it’s already done, but it will stop it going any further.
You’ll find a lot of commands will complete before you even have time to press the keys, but it’s useful for those that do without having to exit Command Prompt completely.
11. Execute Multiple Commands
If there are multiple commands you want to use then you don’t need to input each in turn and wait for them to complete. Instead, you can separate your commands with &&.
For example, if you wanted to output both ipconfig and tree you would input ipconfig && tree. You can do this for however many commands you need — it’s not just limited to two.
12. Customize the Look
The default black and white appearance of the Command Prompt is iconic, but it doesn’t hurt to mix things up a bit. To begin customizing the look, right-click the title bar of your Command Prompt and click Properties.
Begin with the Font tab. Here you can change the Size and Font used. It’s recommended to use a TrueType font (signified with a colorful TT symbol) for clearer display.
Move to the Layout tab. Here you can change the size and position of the Command Prompt window. In actuality, it’s easier just to do this on the window itself, using the default Windows abilities of dragging the sides of the window and moving with the Taskbar.
Finally, go to the Colors tab. Use the radio buttons to select what you want to recolor, then click a color to set it. Alternatively, input the red, green, and blue values. The Opacity slider will adjust the entirety of the Command Prompt window — set it to 100 percent if you don’t want any opacity.
Command Prompt Commander
Hopefully, you’ve learned something new about how to get the most from the Command Prompt. Whether it’s something to make you more efficient, like outputting to a file or auto-completing a command, or just something fun, like changing the colors, there’s so much the Command Prompt can do.
What tips listed here will you be making use of? Do you have your own to share?
Image Credit: Claudio Divizia via Shutterstock.com