Although the command prompt (CMD) is becoming less and less important in Windows, the truth is that it has not lost any real potential, even though many users are not familiar with it.
It is true that many of the CMD commands are tools that are anticipated and that They can be replaced by functions specific to the Windows operating system itself.but they still exist Commands that are useful.
There are more Windows commands that can help you at any given time than you might think, even more effectively than if you did it with the operating system directly.
Less preamble and more essential commands that every Windows user should know.
Command Prompt Commands:
What is CMD?
The CMD (Command Prompt) is a part of the Windows operating system, through which commands can be performed. Advanced tasks using text command.
It is a part of the operating system that It is often used by users with advanced knowledge.since for many of these tasks it is preferable to execute them from this area of the system.
Sure, the Command Prompt interface looks archaic, outdated, and has hardly changed in years, but the truth is that people who regularly use this part of the system don’t care at all about it.
It should be made clear that although CMD copies several of the available capabilities and commands of MS-DOS, It’s not really MS-DOS.
How to access the command prompt
It is very easy to enter the Windows Command Prompt.
The steps to follow are:
- Press Windows + R to open the command window Execute.
- Writes CMD in the box.
- Press Intro or click on Accept.
- Then CMD will open.
Command Prompt Commands
Once you know how to get in, it’s best to know some of the main commands that exist in the command prompt.
Many of these utilities may come in handy at any given time.
Association
As you may know, most files in Windows are associated with a specific program that is responsible for opening them.
You can find out what these associations are by using the command assoc. If you add it with the surname of some type of file (assoc.txt, for example), will tell you the association specific to that file.
This command will reveal the extension names and program names.
File comparison
You can use this command to identify differences in text between two files.
You just have to write fc and then the directory path and name of the two files that you want to compare.
You can extend by writing /b to compare only the binary output, /c to ignore the case of the text and /l to only compare ASCII text.
Netstat
If you put the command netstat -an You will see a list of ports that are currently open and the related IP addresses.
You will also see how it tells you the status of the port: listening, established or closed.
Ping
If you write ping and then one IP address or web domain will send a series of test packets to the specified address.
If they arrive and are returned, you will know if the device is able to communicate with the computer or if there is some kind of failure that blocks communication.
Routes
This command is executed by typing pathping followed by a IP address.
It gives you the same information you’ve seen with ping, plus it transmits information about the path that test packets take.
Powercfg
Powercfg is a command to manage and track your computer’s power usage.
You can use it in different ways:
- powercfg hibernate on and powercfg hibernate off: this is how you manage hibernation.
- powercfg /a: to view the power saving states.
- powercfg /devicequery s1_supported: Displays a list of devices that are in your computer and support standby mode.
- powercfg /lastwake: Shows which device last woke the PC from sleep.
- powercfg /energy: Create an energy consumption report.
- powercfg /batteryreport: Provides you with a detailed analysis of battery usage.
System File Checker
System File Checker It is used for automatic scanning and repair of Windows system files.
In order to run this command you must give it administrator permissions when you run the Command Prompt. Then you just have to put sfc /scannow.
If it finds any corrupt, damaged or missing files, it will automatically replace them with a copy you have.
Stop tasks
When you run tasklist You will see an executable file and a process, as well as the memory.
If you want to stop a program you will put taskkill -im followed by the name of the executable, or taskkill -pid followed by the process ID.
Tasks
Tasks provides access to the Task Scheduler command line. It can be combined with a few options, which gives this command enormous value.
With this command you can program the computer to restart at a specific time, to do a scheduled weekly restart, to turn off when you want it to, or to close a program at a scheduled time, to give you several examples.
Customize the command prompt
With the command prompt You can customize your command prompt to include instructions or information of your own choosing. You would type prompt Your wish is my command:,
You could also use prompt $t on $d at $p using $v: to add the current time, date, drive, path, Windows version number, and more.
Typing prompt will reset your command prompt to the default settings.
Clear the screen
If you have a lot of information on the command prompt screen and you want to clear it all at once, just use cls.
By putting this command and pressing Enter, everything in CMD will be deleted.
System information
The following command gives you information about your computer’s configuration.
In this list you will see both operating system and hardware data, such as the original Windows installation date, last boot time, BIOS version, total memory, available memory, installed revisions, network card settings, and more.
You will have to use systeminfo.
Encryption
Something that some users don’t know is that when a file is deleted, what is actually done is to mark it as inaccessible and the space it occupies is freed, but the file remains recoverable until the system overwrites data on it.
The command you are going to see now allows you to permanently delete a directory or file, since it will overwrite information on top of it.
To erase the C drive, for example, you would use the command cipher /w:cwhich will erase the free space on the drive. This command never overwrites undeleted data.
Check your drivers
As you well know, drivers are an essential part of the Windows operating system.
With the command driverquery you will be able to see a complete list of all the drivers on your PC.
If you use driverquery -v you get more information, as the directory where the driver is installed is included.
IPconfig
With IPconfig you will be able to know what the IP address is that your computer is currently using.
You should know that if you use a router, what you will see is the local network address of the router.
It has interesting extensions such as:
- ipconfig /release followed by ipconfig /renew to force the Windows PC to request a new IP address.
- ipconfig /flushdns to update your DNS address.
Follow-up
The tracert command is similar to pathping.
If you write tracert followed by a IP address or a domainthis is going to track it.
The difference with pathping is that it also tracks how long (in milliseconds) each hop between servers or devices takes.
Off
It can be quite useful to use the command shutdown /r /owhich restarts the PC and starts the Advanced Startup Options menu.
With this command we will also be able to program when we want the computer to turn off. You just have to write shutdown /s /t followed by the time we want to wait until it turns off. It is important to know that this is set in seconds.
That is, if you want your computer to shut down in 1 hour (3,600 seconds) you should put shutdown /s /t 3600
To-do list
You can use the tasklist command to get a current list of all tasks running on your computer.
There are other interesting modifications such as:
- Tasklist -svc: Displays the services related to each task.
- tasklist -v: for more details on each task.
- tasklist -m: will locate the DLL files associated with the active tasks.
Testing
The command chkdsk It is ideal for diagnosing whether you have bad sectors, lost clusters, or other logical or physical errors on your computer.
It has several variants:
- chkdsk c: – will immediately scan the C: drive
- chkdsk /f, /r, /x or /b/ bc: – will fix errors, recover data, unmount the drive or clear the list of bad sectors, respectively. These actions require a reboot, as they can only be performed with Windows turned off.
Format
With the format that you are going to see now, you will be able to format a drive that is on your computer.
If you put format D: /Q /FS:exFAT /A:2048 /V:label Drive D will be formatted with exFAT file system, with allocation unit size of 2048 bytes, and the volume name will be changed to “label”.
Now you have control over a significant number of Command Prompt commands that you will be able to take advantage of.
Learn how we work at .
Tags: Windows 10