Essential and Basic CMD Commands for Use on Windows

The graphical user interface that the Windows operating system currently presents to us is suitable for all types of users. It has been designed to facilitate work for both the most advanced and beginners in front of a PC. But we can always use the command line or CMD if we wish and do without it.

We must bear in mind that on a day-to-day basis with the computer we find ourselves with a complete and complex operating system. This has not stopped growing over the years and its new versions, but of course, Microsoft itself tries to make things much easier for us. For this, as we mentioned, it also improves the graphical user interface so that the system can use and configure it without problems almost everyone.

Essential and Basic CMD Commands for Use on Windows

But of course, as is usual in most areas related to software, some more advanced ones always require more control. Of course, Microsoft could not be left behind in this same sense, for what it offers us the command line. We can access this through the command line also known as CMD , or from Windows PowerShell.


What is the command line or CMD

For those who do not know what we are talking about in these lines, it should be clear that this is not about anything else but a command line from which we can carry out multiple tasks based on written commands. These are generally executed internally and automatically when performing all kinds of actions in the aforementioned graphical interface . However, from the CMD more advanced users will have much more control over all this.

As a curiosity we will tell you that the CMD we are referring to is the abbreviation of CoMmanD and it is a Microsoft program that comes from the mythical This is the MSDOS shell that has been around for decades, in a more or less visible way. In the early days of the Microsoft operating system, everything worked based on commands like the ones we are going to show you in these lines. But with the passage of time this has been falling into disuse passing to the more comfortable and visual graphical interfaces.

In this way, from this section we can carry out a multitude of tasks in the system , all this by typing direct commands to it.

How to open the Windows CMD

Therefore, for those of you who are interested in discovering this section of the Redmond operating system, we will tell you how to run it. First of all, you have to know that it is part of Windows itself, we just have to start it. To do this, we must go to the search box of the Start menu, for example, and write CMD .

CMD administrador

At this point it is worth mentioning that it is advisable in this case to run all this with administrator permissions. Thus we can carry out more complex tasks with greater control over the operating system. Therefore, once the icon with the executable is located , we click with the right button of the mouse on it to be able to execute with administrator permissions.

What is PowerShell and how is it different from CMD

As we told you, the CMD or command symbol has been with us for many years, since the beginning of the Microsoft operating system. Initially the original MSDOS Shell and the default in Windows 10 was the same for a long time and was the system default. But after the appearance of PowerShell , this changed a bit, as this improved version for executing commands went a bit further.

And it is necessary to bear in mind that Windows PowerShell allows us to carry out more complete and complex developments, jobs and executions, all based on commands. This element is an advanced scripting language written in the Microsoft .NET Framework that enables you to perform background tasks or automate tasks. Therefore it could be said that it is an improved and more modern version of the mentioned CMD. Thus, to open it, as in the previous case we write its name in the search box and also execute with administrator permissions.

Ejecutar powershell

The most important basic commands of the CMD

Once we know all this, we are going to show you a series of basic commands that you can use in the aforementioned CMD. Knowing everything that surrounds the command prompt is nothing more than acquiring some experience in using the commands that we will need the most.

As we get used to all this, we can go deeper with parameters that allow us to squeeze them a little more. Of course, something that we must bear in mind is that these parameters that we are talking about, you can see by writing Help followed by the command from which we want to see those parameters.

Commands for working with files

These are CMD commands that focus on working and dealing with the files that we have stored on disk drives in many ways and in depth.

  • ATTRIB: allows us to see in addition to modifying the attributes of any file on the computer in order to expand its usability. We can indicate it as read- only, for total control, just write, etc.
  • COMP – Compare the contents of two files or a set of files directly.
  • COMPACT: allows us to see in addition to modifying the compression status of the files indicated in the command, all valid on NTFS partitions .
  • COPY: lets us copy one or more files to another location on the hard drive.
  • DEL: deletes one or a set of specified files from those saved on the device.
  • ERASE: command to erase one or a group of files that we previously indicate.
  • FC: allows us to compare two or more files and also offers us as output the
  • differences between all specified.
  • FIND: to search for a text string in one or more files that we indicate in the same command.
  • FTYPE: shows on the screen the file types used in the extensions that we indicate. It also allows us to modify those associated types
  • MOVE: to move one or a group of files from one directory to another or in the location that we indicate.
  • RENAME: command to rename one or a group of files.
  • REPLACE: to replace files.

Commands for working with directories

Here we are going to find a series of commands that allow us to manually manage the directories saved on the disk drives

  • CD: allows us to move between the system folders by typing the command and the destination path. It also shows the name of the current directory on its own.
  • CHDIR: lets us see the name of the current directory or changes to another, very similar to CD.
  • DIR: shows a list of all the files and subdirectories in which they are located in the current directory or in any other that we indicate.
  • MKDIR: to create a new directory.
  • RD: to delete a directory.
  • TREE: allows us to view the directory structure of a complete disk unit in a tree form, or of a directory that we specify
  • XCOPY: allows copying both independent files and complete directory structures.

Network commands

If you want to know all the details of your Internet connection or the local network, these commands cannot be missing to execute from the CMD.

  • IPCONFIG: allows us to view all the information on the network cards of the equipment in detail.
  • PING: this is a command that allows us to easily check the status of our connection. In the case of detecting problems, it serves to identify their cause.
  • TRACERT: establishes a route from the local computer to the destination server and shows all the jumps that the connection makes until it reaches the end point and see where there may be specific connection errors.
  • NETSAT: allows us to control, analyze and diagnose a network from the CMD, it also allows us to know the connections that are open on the PC, both local and remote.
  • NSLOOKUP: lets you know if the DNS server that we have configured by default is correctly translating the URLs to the corresponding IP addresses.
  • NBTSTAT: to see the statistics of the TCP / IP protocol and the current connections established on the equipment.

System commands

In this section we find a list of CMD commands to manage some very important parts regarding the operation and behavior of the operating system itself.

  • CHKDSK: powerful command for disk drives that checks their integrity and provides a report on the status of each of them.
  • CHKNTFS: allows us to see in addition to modifying the disk check when starting the operating system.
  • CLS: clears the active screen completely.
  • CMD: starts a new command prompt window like the one we have running at the moment.
  • COLOR: allows us to change the colors of the foreground and background to work here in the best way, on the command line .
  • CONVERT: converts FAT-formatted disk drives to NTFS volumes except for the current one, that is, applicable to the rest of the disks on the computer.
  • DATE: lets us view or sets the current date of the operating system and the PC.
  • DISKPART: teaches us and allows us to configure the properties of the partition of the disk in which we are at this moment.
  • DRIVERQUERY: allows us to see the current status and properties of the computer’s drivers on the screen.
  • EXIT: it helps us to close the current session of the command line.
  • FORMAT: used in order to format an entire hard drive.
  • FSUTIL: allows us to view or configure the properties of the disk drive’s file system .
  • HELP: displays additional information and parameters for the indicated commands on the screen.
  • LABEL – Create, change, or delete the volume label for a disk drive.
  • PRINT: command to print text files .
  • RECOVER – Attempts to recover information from a disk drive that has become damaged or defective for some reason.
  • SHUTDOWN: allows us to perform both a local and remote shutdown of the computer.
  • SYSTEMINFO: shows us on the screen all the properties and configurations of the equipment.
  • TIME: we can see or modify the operating system time.
  • TYPE: to view the content of a text file .
  • SEE: it shows us the version of Windows with which we work.