The command prompt is a Microsoft operating system utility that lets you give instructions to the system from the command line. From the command prompt, it is possible to execute almost all the functions of Windows and also allows to automate tasks, to solve certain problems or to make use of own tools integrated into the CMD. However, the fact that it is command-line based means that many users still do not dare to use it. So, let’s see 12 tricks or tips to master the command prompt in Windows 10.
First of all, we must know how to open a command prompt window,we have to open a Windows Run window, pressing the Win + R key combination, type the cmd command and press Enter.
Always run the command prompt with administrator permissions
The command prompt can be used in standard mode or as an administrator, in administrator you will be able to launch certain commands that will only execute correctly if we have those permissions. To always launch the command prompt with administrator permissions, we search from the search box in the CMD taskbar, right click on CMD and select the Open file location option.
Once this is done, right-click again on the executable that is shown in the file browser that opens and select the option Send to> Desktop as a shortcut. Now, we only have access to the Properties and under the Direct Access tab press, the button Advanced to check the box Run as administrator.
Add access to the command prompt in the Win + X menu
The Win + X menu is a convenient and quick way to access certain Windows 10 tools, so it is interesting to have direct access to the command prompt from there. If you do not see this option and Windows PowerShell appears instead, then you have to open the Windows 10 (Win + I) Settings page and go to Customization> Taskbar and the option to replace the command prompt with Windows Powershell in the menu Win + X we change its state by sliding the switch to the OFF position.
Open a command prompt directly in a specific folder
In the early versions of Windows 10, it was still possible to open a command prompt window on a particular path by right-clicking a folder and selecting the Open Command Prompt option from the context menu. However, Microsoft later decided to replace this option by opening the PowerShell window here.
To open a CMD in a certain folder, we can make some modifications in the Windows registry to leave this option in the context menu or use a very simple trick. Simply open the path in the file browser, type cmd in the address bar of the browser and press Enter.
Copy and Paste Text at the Command Prompt
It is possible that when trying to copy and paste text in the command line we will encounter problems. That is why first of all, we must activate the option Mark (Ctrl + M) and then we can select text to later copy and paste it using the Ctrl + C and Ctrl + V commands or by dragging the text.
Execute previous commands
Some commands that we run at the command prompt can be complex and need help. If at any time we need to execute commands that we have previously released, we can use the up and down arrows of the keyboard to move us by the last executed commands and to re-launch the one we want by pressing Enter.
There is also the option to press F7 and will automatically display a window with the last executed commands.
Drag and drop files
To go up a path from the command prompt we must write the commands that allow us to enter each of the folders. Therefore, going up to a location that requires browsing many directories can be quite tedious. However, the command prompt allows you to drag a folder or file directly from the file browser to the command line window and we will automatically see how the command with the full path is displayed.
Get help from any command
From the command line, we can use the help for any command and thus know its correct syntax and possible parameters. To access this helpful information, simply write the command followed by a space and the symbols / ?. When you press Enter, we will see how help is displayed for the use of this command.
TAB key to complete commands at a command prompt
When we write a command, we can use the TAB key of our keyboard to complete it quickly. For example, when we want to access a folder inside the path where we are we can write cd and then press the tab key to show us the folders and files that the directory contains. Once we find it, press enter and we will not need to write it manually.
Save the output of the command prompt to the clipboard
It is very likely that on certain occasions we want to take the output of the command prompt to a text document to save or treat. To do this, we only have to execute the command ipconfig> C: \ RoutineWhen we want to save the file \ filename.txt and press Enter. The output of the command prompt will be automatically saved in a text file with the given name and in the indicated path.
How to cancel a command
If we have written and released a command at the command prompt that we should not have by mistake, we can simply cancel it with the keyboard shortcut Ctrl + C. What this does is automatically terminate with the command that was running, but does not undo what could have been done until that moment.
How to Run Multiple Commands at Once
If we have several commands that we want to use and we know in advance that each one will take a while to execute, then the command prompt allows us to launch multiple commands at once. For this, we have to write one followed by another with the symbols && between each one of them. In this way, the system symbol interprets them by separating and executes one by one without having to be in front of the computer pending when one finishes launching the other.
Customize the appearance of the command prompt
By default, the command prompt window has a fairly sober design, a black background with white lettering. However, if we right click on the title bar of the command prompt and access Properties, we will be shown a window with which we can change the color of the wallpaper, the color of the text or the opacity from the Colors tab to put it to our liking.