How to Master the Command Prompt in Windows 10
MUO
How to Master the Command Prompt in Windows 10
Learn how to run multiple commands, get help on any command, and more with the Windows 10 Command Prompt. 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 changing the colors, executing multiple commands, getting help on any command, and much more. To open the Command Prompt, type cmd in the Start menu search bar and select the Best Match. Alternatively, press Windows key + R, type cmd into the Run utility, and press Enter to launch the Command Prompt. 1 How to Always Open Command Prompt as Administrator
You can run the Command Prompt in standard and administrator modes. Some commands will only work in the latter, so it generally makes sense just to use that mode all the time. To set Command Prompt to always opens as administrator from the Start menu: Type cmd in the Start menu search bar. Right-click the Best Match and click Open file location. Right-click the Command Prompt shortcut and click Properties. On the Shortcut tab, click Advanced. Check Run as administrator and click OK twice. 2 How to Quickly Access Command Prompt Through the Power User Menu
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. To adjust this so that Command Prompt appears on the power user menu: Press Windows key + I to open Settings. Click 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. 3 How to Open Command Prompt via the Folder Context Menu
Sometimes, you want to run a Command Prompt string from a specific folder. Rather than manually do that, you can edit the registry so that when you press Shift and right-click inside a folder, you get the option to Open command window here. To apply this change, head to and download its registry tweak. 4 How to Copy and Paste in Command Prompt
To paste text into the Command Prompt, press Ctrl + V, the same as you would in most other applications. Copying works a bit differently. First, press Ctrl + M to enter Mark mode. Left-click and drag to highlight the text you need, then press Ctrl + C or Enter to copy it to your clipboard. Think that sounds too cumbersome? Right-click the Command Prompt title bar and click Properties. Switch to the Options tab, tick Quick Edit 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 in Command Prompt
It can be tedious to write out a folder or file path name in the Command Prompt. You don't need to waste 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 How to 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 to Auto-Complete Commands
You can press the Tab key to auto-complete your command. This is useful when you don't know the full name of the command or save you time. For example, you can press Tab to automatically complete it rather than typing out a full file path. 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 How to Output to a File or Clipboard on Command Prompt
If you want to save the output of the Command Prompt, then you could copy it, paste it into a text editor, and then save. But there's a quicker method, 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 How to 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 processed. It won't reverse what has already been done, but it will stop it from 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 How to Execute Multiple Commands
If there are multiple commands you want to use, 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 How to Customize the Look of Command Prompt
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 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 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: drag the sides of the window to resize and drag on the title bar to move the window. Finally, go to the Colors tab. As you might expect, here, you can . 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% if you don't want any opacity. Learn Some New Commands
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.