Tutorials

Cmd cheats: clean screen, customize cmd, and startup commands

Table of contents:

Anonim

In many of the tutorials we do, it is necessary to know different CMD tricks to use this Windows command window. This terminal resembles the interface of the old MSDOS, and in fact, offers similar functionalities, although more advanced. Today we will see interesting tricks with CMD such as cleaning the screen, viewing our IP, pinging Google, customizing its interface, browsing files, etc. So, if you are a new user in CMD, this article will be interesting for you.

Index of contents

With CMD we can do things that cannot be done graphically, or even if it is possible, it will be much easier from this black screen. With the simple typing of a command we can, for example, save ourselves from entering the control panel and searching about the endless options that are in it.

We do not pretend to know all the commands or everything that CMD can do, because that would be impossible in a single article, but we will see the basic operation, how to interact with it and the most interesting commands.

What is CMD or Command Prompt

CMD or Command Prompt is a Windows command interpreter tool. Through it, we can interact with the operating system by entering commands. We can run applications, copy, paste, delete and create new files, modify configuration options and practically everything we can think of that we can do from its graphical environment.

CMD functionality is inherited from Microsoft's first system, MSDOS. It consists of a black screen with the same file and command navigation system as this one, although of course much more advanced and complete.

How to open CMD window as administrator

Obviously, the first thing we will have to do is open the CMD window on our computer. For this, the best way to get to CMD is through the start menu, since we will only have to open the start menu and type "CMD". A search option will appear and we can open it, although it is an important difference between " Open as Administrator " and as a normal user.

  • Open as CMD administrator: in this way, we will be able to execute advanced commands to modify the system configuration. Open as a local user: we will only be able to execute the basic and non-critical commands for the system, and we will not be able to execute most of the important configurations.

Customize CMD

We already fear it open, now let's see how to get an interface to our liking through its customization options.

To access them, we will only have to right-click on the terminal window bar, and choose " Properties ". A window will open and we will have several tabs to modify different CMD options.

  • Options: it is used to modify the basic operation of the console, command buffer, interactions, text selection and cursor size. Font: we can choose font size and font type. Design: we can modify the size of the default window. Colors: from here we can modify the color of the window background, the color of the text and even the transparency of the window background.

Create CMD Shortcut

If we are going to use the CMD window frequently, it will be best to create a shortcut on our desktop or anywhere to interact with it.

It is not even worth looking for the icon at startup, we only click on the desktop, choose " New-> Shortcut ". In the first window of the wizard we put " CMD ", click " Next " and put a name. Done, the shortcut created, from it we can run CMD as Administrator or normally by right-clicking.

Enter CMD commands and options (Always use help)

Surely we will all imagine how to use commands in CMD, but if it is the first time you open the window it is worth keeping a few things in mind.

The first thing, to execute a command, all we have to do is write it behind the Promt, the line that shows the directory where we are at all times. After writing it, we will press Enter to execute it, if an error is displayed, it will mean that we have written it wrong, that we do not have permission, or that the command does not exist.

Let's try executing the command " help " that will show us all the commands available in CMD. Then write:

help

You will see the entire list of commands that you can basically run in CMD.

Super basic commands to navigate CMD

There we see a very interesting one called " CD " that is used to navigate through the directories of our system. Let's see how it is used, and for that we will again use help or in this case " /? " We must write it behind the command.

cd /?

The expression "/?" it can be used absolutely with all commands to show its corresponding help. It is basic in CMD to know this.

We see that a help appears on how to use the command, it shows that if we put "cd.." we will be leaving a directory, and if we write " cd "We will be accessing a new file.

At this point, we will be interested to know the command " dir " to list the files that are in a directory, in this way we can know the name of the folder where we want to enter. Let's write:

dir

We are shown all the files and directory that has in the current folder where we are, that is, in "C: \ Users \ josec \".

We are going to access our document folder and get ready what is there. When we start to write the name of the file or directory, we can press the "Tab" key so that the name is automatically completed.

cd Documents

dir

Copy and paste file path in CMD and other text

Surely if we want to access a complex route directly and we do not know exactly how its directories are written, the easiest way will be to access it graphically and paste the route in CMD. Let's see how.

We access the directory that interests us in graphic mode and click on the navigation bar to select the route. At this moment we press " Ctrl + C " to copy.

Now we go to CMD again and we will only have to write " cd " and right click on the black background. Automatically paste the text that we copied before, without using "Ctrl + V".

This is applicable to any text or path.

Copy routes by dragging the folder to CMD

We can even directly obtain the path of a directory by dragging its folder to CMD. We put the cd command for example, and now we drag a folder to the window, its path will automatically be copied.

Clean CMD

At this point, you may have noticed that your window is full of crap from executing other commands. We can also clean CMD with a command called “ cls ”, so we write it:

cls

The screen will remain clean, although we can always see the above again if we navigate with the mouse.

Look at the history of commands used in CMD

When we have been using different commands for a while, we may want to repeat with one of them. CMD has a history of commands used to access them without having to retype them. To do this we will have two options:

Pressing the " Up " and " Down " arrows on the keyboard we can select the last commands used.

We also have a command to list this history.

doskey / history

Look at the IP of your PC and ping google.

Two of the most used commands in CMD to check the status of the network are ipconfig and ping. We are going to see very quickly how to use them.

ipconfig is a command that is used to display network information and configuration of our adapter. In it we can do many things that would take up a complete tutorial and more.

We are going to use it to see the IP address of our computer, as well as more information regarding the network adapter. We wrote:

ipconfig

If our connection is by cable, we will look at the adapter that says: "Ethernet" and if it is Wi-Fi, then the "Wi-Fi" one.

On the other hand, we have the ping command, which is very useful to check the latency of our connection in milliseconds (ms) and that we have an Internet connection. Ping sends a packet to the url that we write and then receives it, so we will know how long it takes for our connection to respond. We will use it in the following way:

ping

For example:

ping www.google.com ping www.profesionalreview.com ping 192.168.2.1 (to our router)

Run multiple commands at once in CMD

Using the character “ && ” that in computer science almost always means “ AND or AND ”, we can execute different commands at the same time. When one finishes, the other will start, for example:

ipconfig && ping www.google.com

Pipes in CMD

Pipelines is a way of redirecting the information displayed by a command to a different one that will use it in the way it was intended. With the pipes we can copy the information that a command would show on the clipboard, or gradually list the information displayed on the screen. To make a pipe the character “|” is used which is writes by pressing the " Alt gr + 1 " key.

For example, we are going to copy the ping information to the clipboard, for this we must place the “ clip ” utility behind ping, like this:

ping www.google.com | clip

We will see that nothing is shown on the screen, but if we take a notepad and paste what is on the clipboard " Ctrl + V ", we will see that the command information is pasted.

Now we are going to see how to display the information little by little. This will be useful for opening a large document or listing a directory with many folders and files. We wrote:

dir | more

We see that, to continue showing information, we will have to press Enter so that little by little it is listed.

Well, for now, these are the most useful CMD tricks in our opinion for users who want to start with the Windows command terminal. Remember, always use “/?” to see the help of the command, this way everything will go smoothly and without the need for tutorials.

To learn more about commands you can use in CMD, visit these tutorials:

If you know other interesting tricks for CMD, write us in the comments, these types of tutorials are very good to expand information.

Tutorials

Editor's choice

Back to top button