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
-
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
-
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>
-
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
-
Mkdir CMD prompt
This command prompt lets you generate subdirectories within the directories.
Syntax: mkdir [<drive>:]<path>
Example: mkdir hi
-
Powercgf
It aids detect and troubleshoot power efficiency problems and battery issues with your PC running Windows.
Syntax: powercfg <options> <arguments>
Example: powercfg /?
-
Shutdown
It is useful to restart or shut down your computer.
Syntax: shutdown <options>
Example: shutdown /r
-
SYSTEMINFO: System Information
This command prompt displays the PC’s hardware and software information.
Syntax: systeminfo
Example: systeminfo /fo csv
-
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
-
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>
-
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
-
Compact
It lets you compress files and folders on the PC.
Syntax: compact <options> <file>
Example: compact /c sample_file.txt
-
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
-
Del
It deletes one or more files.
Syntax: del <options> <file(s)>
Example: del sample.txt
-
Erase
This command has a similar function to the Del prompt.
Syntax: erase <options> <files(s)>
Example: erase a1.txt
-
Doskey
It lists command prompts used previously, like a history menu.
Syntax: doskey /history
Example: doskey /history
-
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
-
Exit
It ends the prevalent interpreter session and also ends the Command Prompt window.
Syntax: exit
Example: exit
-
Find
This command locates a particular text in a file.
Syntax: find <string> <file>
Example: find “text” <file>
-
Help
This command works to show cmd commands list with one-line descriptions.
Syntax: help
Example: help <exit>
-
Hostname
With this command, you can find the host name of the PC.
Syntax: hostname
Example: hostname
Top Network CMD commands
-
IPCONFIG- This Command Prompt lets you check the network details for troubleshooting.
Syntax: ipconfig
Example: ipconfig
-
Netstat- This command shows all activated TCP connections.
Syntax: netstat
Example: netstat
-
Nslookup- It is used by web developers to see DNS records list for specific domains.
Syntax: nslookup
Example: nslookup google.com
-
ARP- This command lets you show, change, delete Address Resolution Protocol data of network devices.
Syntax: arp
Example: arp
-
NBTSTAT- It displays current TCP/IP connections and protocol statistics.
Syntax: nbstat
Example: nbstat
-
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
-
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
-
Route- It lets you alter and check Windows PC route table.
Syntax: route
Example: route PRINT