31 Useful CMD Commands That Windows Users Should Know

    

31 Useful CMD Commands That Windows Users Should Know

The Command Prompt is a vital part of the Windows Operating System. You can enter text commands on it to perform various kinds of tasks which include displaying important system details, creating directories and sub-directories, repairing corrupted system files to name a few.

In this blog post we have prepared a list of 31 useful CMD commands that you should know if you are a Windows user or planning to use Windows Operating System in future. Knowing these commands will give you more control over your Windows PC, Laptop, and desktop.

But before we deep dive into the useful commands list it is better to know the ways to launch Command Prompt application on Windows. In case if you know that, you can skip that part and go directly to the CMD commands list section of this article.

How To Open Command Prompt Application On Windows?

There are basically two methods which work on most Windows OS to open Command Prompt application. These methods are applicable for Windows 11/10/8/7/Vista/XP.

Method 1:

  • First click on the Windows start button.
Windows Start Button


  • Then click on the search bar and enter “command prompt”.
    Command Prompt
  • Then click on the Command Prompt application to launch it.
  • And there you go; you can now start typing commands.
Note: Some commands require Command Prompt application with administrator privileges so for that you can click on “Run as administrator” present below “Open” option. 

Method 2:

    Launching command prompt from Run Command


  • On your keyboard press Windows + R Keys simultaneously. 
  • After that you will see a small pop-up window. 
  • Type “cmd” and press “Enter” key on your keyboard.
  • The Command Prompt application will launch on your Windows PC.

Useful CMD commands List:

ASSOC:

assoc command is nothing but an internal command available in most Microsoft Windows Operating Systems. This command is very much helpful as it lists as well as modifies different types of file extension associations on the computer system.

assoc

Syntax for this command:

 assoc .<extension>=<filetype>

Example:

 assoc

When you simply enter assoc on Command Prompt without providing any parameters, then all the current file extension associations will be printed on the screen.

REN:

The ren (rename) command is helpful if you want to rename files or directories.

ren


·         Syntax for this command:

rename [drive:][path] filename1 filename2

OR

ren [drive:][path] filename1 filename2

·         Example:

 ren /?

CD or CHDIR:

CD (Change Directory) command is used to display the current directory. Moreover, you can also change the current directory to a new one with the help of this command.

cd


·         Syntax for this command:

To view current directory: cd or chdir (Enter any one)

To change directory: cd <directory_name> OR chdir <directory_name>

·         Example:

cd hello_folder OR chdir hello_folder

where hello_folder is the name of the directory or folder.

DIR:

The dir command is to be used when you want to list all the files and subdirectories present in a specific directory.

dir


·         Syntax for this command:

dir

·         Example:

dir

MKDIR:

The command mkdir (make directory) enables users to create a new directory or a subdirectory. Moreover, there is another command that does the same task. And it is md.

mkdir


·         Syntax for this command:

mkdir <path> OR md <path>

·         Example:

mkdir hello OR md hello

The above CMD command will create a directory or folder named hello.

POWERCFG:

This command helps Windows users to detect as well as troubleshoot any battery life related or energy efficiency related issues on their PC.

·         Syntax for this command:

powercfg <options> <arguments>

·         Example:

powercfg /?

SYSTEMINFO:

The name of this command says it all. This command displays all the vital information about hardware and software of the computer system.

systeminfo


·         Syntax for this command:

systeminfo

·         Example:

systeminfo

SHUTDOWN:

This command can be used to shutdown or restart your Windows machine. Furthermore, this command is also capable of controlling the shutdown process.

·         Syntax for this command:

shutdown <options>

·         Example:

shutdown /r

TASKLIST:

The command tasklist displays all running processes along with their memory usage and other key details on the computer system.

tasklist


·         Syntax for this command:

tasklist <options>

·         Example:

tasklist -v

TASKKILL:

This command kills or eliminates any process that is running on the computer system. For details about this command enter taskkill  /? on command prompt.

·          Syntax for this command:

taskkill <options> <task or process>

·         Example:

taskkill  /pid 9500

CHKDSK:

The command chkdsk scans the local file system as well as metadata for errors.

·         Syntax for this command:

chkdsk <volume> <options>

·         Example:

chkdsk C: /f

SFC:

sfc (System File Checker) command does the task of verifying and replacing corrupted Windows system files. It is an administrator level command. This means that in order to run this command you have to open Command Prompt application in administrator mode.

·         Syntax for this command:

sfc <options> <files or directories>

·         Example:

sfc /scannow

DISM:

dism (Deployment Image Servicing and Management) command is also an administrator level command which has the capability to repair Windows images and it can also update Windows installation media. This command is for advanced Windows users.

·         Syntax for this command:

DISM.exe [dism_options] Imaging_command [Imaging_arguments]

OR

DISM.exe {/Image:path_to_offline_image | /Online} [dism_options] servicing_command [servicing_arguments]

·         Example:

DISM /Online /Cleanup-Image /CheckHealth

CLS:

If your command prompt window is filled with lots of executed commands and its results. And you want to clear the contents of the screen, then simply enter the cls command and it does the job with perfection.

·         Syntax for this command:

 cls

·         Example:

cls

DOSKEY:

When you enter the doskey command in the command prompt application it will list all the previously executed commands. So, in case if you want to see your past cmd commands then this useful command will help you to achieve that.

doskey


·         Syntax for this command:

doskey /history

·         Example:

doskey /history

COPY:

The copy command copies one or more than one file from one location to another location.

·          Syntax for this command:

copy <options> <source> <destination>

·         Example:

copy main_file.txt main_file_copy.txt

DEL:

The del command deletes single or multiple files at a time.

·         Syntax for this command:

del <options> <file(s)>

·         Example:

del hello.txt

ERASE:

The erase command is completely similar in function when compared to del command.

·         Syntax for this command:

erase <options> <file(s)>

·         Example:

erase hello.txt

DRIVERQUERY:

This command displays the list of all the drivers installed on the computer system. Furthermore, this command also gives crucial details of driver’s module name, driver type and last but not the least link date.

driverquery


·         Syntax for this command:

driverquery

·         Example:

driverquery

EXIT:

When you type this command and hit the Enter key on your keyboard then the currently opened Command Prompt application will close. This is useful when you no longer want to enter commands and want to close the cmd application without using mouse.

·         Syntax for this command:

exit

·         Example:

exit

HOSTNAME:

This command is self-explanatory but in case if you do not get it then let me tell you that this command will display the host name of your computer or laptop.

·         Syntax for this command:

hostname

·         Example:

hostname

CLIP:

This command copies the result of the executed command or the file contents to the clipboard.

·         Syntax for this command:

<command> | clip

·         Example:

  clip <filename>

COLOR:

If you want to customize the Command Prompt background color as well as text color, then you should try color cmd command.

color


·         Syntax for this command:

color <background><font>

color


·         Example:

color 1b

DATE:

The date command is used to show and change current system date. When you enter this command and do not supply any parameters then it outputs the current system date and asks you to enter a new date in mm-dd-yy format.

date


·         Syntax for this command:

date

·         Example:

date /t

IPCONFIG:

If you want to list the network details of your computer or laptop then you should definitely go with ipconfig command. This is beneficial command when you are troubleshooting the network issues.

ipconfig


·         Syntax for this command:

ipconfig

·         Example:

ipconfig

NETSTAT:

This command gives complete details of currently active TCP connections.

·         Syntax for this command:

netstat

·         Example:

netstat

NSLOOKUP:

If you are a Web developer or IT professional, then chances are high that you have used this command before. So, in simple terms nslookup gives DNS records list for a particular domain name.

nslookup


·         Syntax for this command:

nslookup

·         Example:

nslookup google.com

ARP:

With the help of this command you can change, delete, and show ARP (Address Resolution Protocol) details of the devices present on the network.

·         Syntax for this command:

arp

·         Example:

arp

PING:

This command is one of the useful network troubleshooting commands. This command helps users to evaluate the connectivity of their device with other device(s) on the network.

ping


·         Syntax for this command:

ping <options> <host>

·         Example:

ping google.com

TRACERT:

The command tracert (traceroute) is a networking-based command that displays the number of hops that a packet encounters when going to its destination. In addition to that, the IP addresses of all the hops are also displayed on the screen.

tracert


·         Syntax for this command:

tracert <options> <destination>

·         Example:

tracert google.com

HELP:

This command gives you a list of all the different commands that you can execute on Command Prompt application. Moreover, this command also gives a short one-line description for every command.

help


·         Syntax for this command:

help

·         Example:

help cd

Final Words:

Well now you know so many useful and important CMD commands. This will for sure give you more command over your windows PC. From the list I sometimes use SFC and DISM commands to fix system file corruptions and repairing windows image, etc. and other  commands as well from time to time. If you found this article useful, and you know somebody who needs to know important CMD commands then please share this article with them. And keep visiting Novadroid360 for more interesting technology articles and as always thanks for reading this article. 

He is a passionate Tech Enthusiast who loves to read and write about fascinating technologies. Before becoming a tech blogger he was an IT Trainer in an institute. He loves to play PC games in free time and his all time favourite PC game is GTA V. And sometimes he spends time in nature when free. Instagram

Post a Comment