While Microsoft Windows versions have become enhanced with many new features, you can still make use of the tried and tested command prompt. It can be used to unveil lesser-known Windows features easily. Here, we will show you numerous ways to utilize the cmd commands and maximize productivity and troubleshoot Windows. 

Ways to trigger CMD prompts in Windows

To use the Command Prompt application on Windows XP and later versions, you can use 2 methods.

Method 1

After dragging the cursor and clicking the ‘Windows’ icon on the task bar, tap the search icon. Enter ‘Command’ and click on the ‘Command Prompt’ application. This will activate command prompt codes in a window.

Method 2

Press the keys Windows + R and you will see a small window popping up. Enter cmd and then press enter. The Command Prompt application is activated. 

A look at the popular and top CMD commands

  1. CD – Change Directory

This command displays the current directory and it also lets you alter it by specifying a new location.

Syntax: cd (to view current directory), cd <directory> (to alter the location of the directory)

Example: cd Pictures

  1. REN: Rename

This basic command prompt lets you rename directories or files.

Syntax: ren <path><old name> <new name>

rename <path><old name> <new name>

  1. ASSOC: Fix File Associations

You can associate a specific extension to run any application/program by this prompt.

Syntax: assoc [.ext[=[fileType]]]

Example: D:\Users\ assoc.xls

  1. Mkdir CMD prompt

This command prompt lets you generate subdirectories within the directories.

Syntax: mkdir [<drive>:]<path>

Example: mkdir hi

  1. Powercgf

It aids detect and troubleshoot power efficiency problems and battery issues with your PC running Windows. 

Syntax: powercfg <options> <arguments>

Example: powercfg /?

  1. Shutdown

It is useful to restart or shut down your computer.

Syntax: shutdown <options>

Example: shutdown /r

  1. SYSTEMINFO: System Information

This command prompt displays the PC’s hardware and software information.

Syntax: systeminfo

Example: systeminfo /fo csv

  1. Chkdsk

This command checks the PC’s local file system as well as metadata to detect any errors within them.

Syntax: chkdsk <volume> <options>

Example: chkdsk <volume> /f

  1. Clip

The command prompt lets you copy the output of command and also the contents of a file to device system clipboard.

Syntax: <command> | clip

Example: clip <filename>

  1. Color CMD prompt

It is handy if you wish to change the text and background hues of the Command Prompt window.

Syntax: color <background><font>

Example: color 1b

  1. Compact

It lets you compress files and folders on the PC.

Syntax: compact <options> <file>

Example: compact /c sample_file.txt

  1. Copy 

It enables you to copy multiple files from one place in the PC HDD to another.

Syntax: copy <options> <source> <destination>

Example: copy a_file.txt a_file_copy.txt

  1. Del

It deletes one or more files.

Syntax: del <options> <file(s)>

Example: del sample.txt

  1. Erase

This command has a similar function to the Del prompt.

Syntax: erase <options> <files(s)>

Example: erase a1.txt

  1. Doskey

It lists command prompts used previously, like a history menu.

Syntax: doskey /history

Example: doskey /history

  1. Driverquery

It generates a list of drivers your PC has installed and shows key details like link date, driver type etc.

Syntax: driverquery

Example: driverquery

  1. Exit

It ends the prevalent interpreter session and also ends the Command Prompt window.

Syntax: exit

Example: exit

  1. Find

This command locates a particular text in a file.

Syntax: find <string> <file>

Example: find “text” <file>

  1. Help

This command works to show cmd commands list with one-line descriptions.

Syntax: help

Example: help <exit>

  1. Hostname

With this command, you can find the host name of the PC.

Syntax: hostname

Example: hostname

Top Network CMD commands

  1. IPCONFIG- This Command Prompt lets you check the network details for troubleshooting.

Syntax: ipconfig

Example: ipconfig

  1. Netstat- This command shows all activated TCP connections.

Syntax: netstat

Example: netstat

  1. Nslookup- It is used by web developers to see DNS records list for specific domains.

Syntax: nslookup

Example: nslookup google.com

  1. ARP- This command lets you show, change, delete Address Resolution Protocol data of network devices.

Syntax: arp

Example: arp

  1. NBTSTAT- It displays current TCP/IP connections and protocol statistics.

Syntax: nbstat

Example: nbstat

  1. Net- It shows the network details. 

Syntax: net <accounts, computer, config, continue, file, group, help, helpmsg, localgroup, name, pause, print, send, session, share, start, statistics, stop, time, use, user, view>

Example: net

  1. Whois-It shows domain details like IP address, owner’s name and more. To use it, install Microsoft’s Whois Program first.

Syntax: whois <domain URL>

Example: whois google.com

  1. Route- It lets you alter and check Windows PC route table.

Syntax: route

Example: route PRINT