The Windows command prompt is a feature that's been a cadre function of the Windows operating system for a long fourth dimension. At that place are some CMD commands that are so useful and easy to use that fifty-fifty regular users see the Windows command prompt as a fundamental part of the operating organization.

In that location are e'er rumors that information technology will be phased out at some point, simply that's unlikely to happen whatever time soon.

The following are 21 of the best CMD commands you should know if y'all want to take more control over your Windows PC.

Too, be sure to check out our YouTube video where we go over the commands listed in this commodity:

1. ASSOC: Fix File Associations

One of the most powerful tools in the CMD control library is the ASSOC command.

Your computer associates certain file extensions with certain programs. This is how your computer knows to open Adobe when you double click a PDF file, or Microsoft Word when you lot double click a DOC file.

You can view all the file associations your computer knows about past typing ASSOC in the command window. You'll see the file extension and the program it's associated with.

You lot can fix the association by typing something like assoc .dr.=Word.Document.8.

2. FC: File Compare

Sometimes when files are changed over time, information technology's hard to retrieve what the differences were between versions. You may non know that a CMD command offers the ability to compare files and see all differences, but it'southward true.

The FC control performs either an ascii or a binary file comparison and will list all of the differences that information technology finds.

Fc /a File1.txt File2.txt volition compare 2 ascii files.

Fc /b Picture1.jpg Picture2.jpg will exercise a binary compare on two images.

3. IPCONFIG: IP Configuration

Network troubleshooting is never simple, but 1 control that makes information technology much easier is IPCONFIG.

Using this command in the CMD command prompt returns detailed data well-nigh your electric current network adapter connectedness including:

  • Current IP Accost
  • Subnet Mask
  • Default Gateway IP
  • Current domain

This information can help you lot troubleshoot router issues and other connection bug yous could be having with your network adapter.

iv. NETSTAT: Network Statistics

Concerned that yous could accept malware running on your computer that'south connecting to net locations without y'all knowing about it?

If you run a NETSTAT control in the command prompt, you can get a list of all active TCP connections from your computer.

5. PING: Send Examination Packets

An IT Annotator's best friend is the PING command.  Running this command sends exam packets over the network to the target system.

Yous can employ the PING control to exam whether your computer can access another computer, a server, or even a website. It can help with revealing network disconnections. It besides provides transit time for the packets in milliseconds, and then it also reveals a bad network connexion besides.

half-dozen. TRACERT: Trace Route

TRACERT is a fascinating Windows Command to utilize. If you're ever curious to come across the path your internet traffic takes to go from your browser to a remote system like Google servers, you tin use TRACERT to run into it.

The command stands for "Trace Road", which sends packets out to a remote destination (server or website), and provides yous with all of the post-obit information:

  • Number of hops (intermediate servers) before getting to the destination
  • Time it takes to become to each hop
  • The IP and sometimes the name of each hop

TRACERT can reveal how the routes of your internet requests change depending where you're accessing the web. Information technology likewise helps with troubleshooting a router or switch on a local network that may be problematic.

7. POWERCFG: Power Configuration

Are you frustrated with how speedily your laptop seems to run out of ability? Information technology could be that your power settings are configured as efficiently as possible. There'south a windows CMD command called POWERCFG (power configuration) that can aid. Run the command prompt as an administrator and type powercfg – free energy to get a total ability efficiency report.

The process can take upwardly to about a minute, but when information technology's done, you'll come across whether there are any warnings or errors that might help you better the power efficiency of your organization.

View the free energy-report.html file to see the details of those errors and warnings.

8. SHUTDOWN: Plough Off Computer

The SHUTDOWN command is a pretty versatile command that lets you shutdown the computer but control the beliefs of that shutdown. It's commonly used as a scheduled task or function of an IT batch job after patches take been applied to a computer organisation.

Typing shutdown /i from the command prompt volition initiate a shutdown, but it'll upon a GUI to requite the user an choice on whether to restart or practice a total shutdown. If y'all don't want to have any GUI pop up, you can just issue a shutdown /s command.

There is a long list of other parameters y'all can use to do a log off, hibernate, restart, and more than. Just type shutdown without any arguments to see them all.

ix. SYSTEMINFO: Organization Information

If you need to know what brand of network bill of fare you lot have, processor details, or the verbal version of your Windows OS, the SYSTEMINFO command tin can aid.

This control polls your organization and pulls the most important data about your organization. It lists the information in a clean format that'south like shooting fish in a barrel to read.

10. SFC: System File Checker

If you lot're ever concerned that a virus or some other software might have corrupted your core system files, at that place'due south a Windows command that can scan those files and ensure their integrity.

Yous need to launch CMD as administrator (right click and cull Run as Administrator). Typing SFC /SCANNOW volition check the integrity of all protected arrangement files. If a trouble is found, the files volition be repaired with backed-up organization files.

The SFC control also lets yous:

  • /VERIFYONLY: Check the integrity merely don't repair the files.
  • /SCANFILE: Scan the integrity of specific files and fix if corrupted.
  • /VERIFYFILE: Verify the integrity of specific files just don't repair them.
  • /OFFBOOTDIR: Use this to do repairs on an offline boot directory.
  • /OFFWINDIR: Utilise this to do repairs on an offline Windows directory.
  • /OFFLOGFILE: Specify a path to save a log file with scan results.

The scan can take upwardly to 10 or 15 minutes, and then give it time.

eleven. NET USE: Map drives

If you want to map a new drive, you could always open File Explorer, right click on This PC, and go through the Map Network Drive wizard. However, using the Internet USE command, you can do the same affair with ane command string.

For example, if you have a share binder on a computer on your network called \\OTHER-COMPUTER\SHARE\, you can map this every bit your own Z: drive by typing the command:

Net use Z: "\\OTHER-COMPUTER\SHARE" /persistent:yes

The persistent switch tells your computer that you want this drive remapped every time you log back into your computer.

12. CHKDSK: Check Disk

While the SFC command but checks the integrity of cadre system files, yous can use the CHKDSK command to scan an entire bulldoze.

The command to check the C: drive and repair whatever bug, launch the command window equally an ambassador and type CHKDSK /f C:.

This command checks for things like:

  • File fragmentation
  • Disk errors
  • Bad sectors

The command can fix any disk errors (if possible). When the control is finished, you'll see a status of the browse and what actions were taken.

13. SCHTASKS: Schedule Tasks

Windows comes with a wizard for creating scheduled tasks. For example, maybe you have a BAT file stored on C:\temp that you want to run every day at noon.

Y'all'd accept to click through the Scheduled Task wizard to configure this. Or you tin type a single SCHTASKS command to gear up information technology up.

SCHTASKS /Create /SC HOURLY /MO 12 /TR Case /TN c:\temp\File1.bat

The scheduled switch accepts arguments like minute, hourly, daily, and monthly. Then you lot specify the frequency with the /MO command.

If y'all typed the command correctly, you'll meet the response, SUCCESS: The scheduled task "Example" has successfully been created.

xiv. ATTRIB: Change File Attributes

In Windows, you can modify file attributes by right clicking on a file and finding the right holding to change. Nonetheless, instead of hunting around for the file attribute, you can use the ATTRIB command to set up the file attributes.

For case, if you blazon: ATTRIB +R +H C:\temp\File1.bat, it'll set File1.bat equally a hidden, read-just file.

There is no response when it's successful, then unless you see an error message, the command worked.

Other Windows CMD Commands

As you tin can meet, in that location are some powerful and useful things you tin exercise with the Windows command prompt, if you lot know the correct commands.

Believe it or not, there are even more commands that will give you the ability to do some things yous probably never realized but by typing a uncomplicated command.

  • BITSADMIN: Initiate upload or download jobs over the network or net and monitor the current state of those file transfers.
  • COLOR: Change the background colour of the command prompt window.
  • COMP: Compare the contents of any two files to meet the differences.
  • Discover/FINDSTR: Search for strings inside of any ASCII files.
  • PROMPT: Change the command prompt from C:\> to something else.
  • Championship: Change the title of the command prompt window.
  • REGEDIT: Edit keys in the Windows registry (use with caution).
  • ROBOCOPY: A powerful file copy utility built right into Windows.

If you're interested in learning more, Microsoft offers a full listing of all of the Windows CMD commands included in the latest version of the Windows OS.