TechPocket

21 Best Windows CMD Commands Prompt That You Must Know

Windows CMD Commands

Using the Windows CMD Commands Prompt has long been a standard component of the Windows operating system. If you have used the command prompt Windows 10, you’ve probably noticed that it’s an essential aspect of the operating system. However, there are always rumors that it may be phased out at some point in the future.

[lwptoc]

CMD Commands Tricks

To better manage your Windows PC, 21 of the most useful and basic CMD Commands with examples are here.

1. ASSOC: Fix File Associations

The ASSOC command is one of the most powerful tools in the CMD command suite.

Certain file extensions are associated with specific apps on your computer. For example, when you double-click a PDF or DOC file, your computer knows to open Adobe Reader or Microsoft Word.

By typing ASSOC in the command line, you can see all the file associations your computer has. You’ll notice the file extension and the accompanying app if you look closely.

Assoc.doc=Word.Document.8. can be used to set the association.

2. FC: File Compare

It can be challenging to remember the differences between versions of files that have been altered over time. You may not be aware that the CMD command may be used to compare files and reveal all differences, but it is.

The FC command performs Ascii or binary file comparisons, displaying the differences between them.

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

Fc /b Picture1.jpg Picture2.jpg will make a binary comparison of two images.

3. IPCONFIG: IP Configuration

IPCONFIG is a command that greatly simplifies network troubleshooting.

To get more information about your current network adapter, use the following command in the CMD command prompt:

Current IP Address
Subnet Mask
Default Gateway IP
Current domain

This information can assist you in troubleshooting router issues & other connection issues you could be having with your network adapter.

4. NETSTAT: Network Statistics

Is it possible that your computer may be infected with malware connected to the internet without your knowledge?

If you type NETSTAT on the command prompt, you can see all your computer’s TCP connections.

5. PING: Send Test Packets

The PING command is an IT analyst’s best buddy. Packets will be sent to the target system across the network for testing using this command.

Moreover, use the PING command to see if another computer, server, or even the Internet is accessible from your computer. It can assist in identifying network issues. Additionally, it shows the packet transit time in milliseconds, indicating a poor network connection.

6. TRACERT: Trace Route

TRACERT is a fascinating command in Windows that you should try out for yourself. For example, you can use TRACERT to view the path your internet traffic travels to get from your browser to a remote system, such as Google servers.

You can use the command “Trace Route” to trace the path of packets sent from your computer to a remote server or website.

1. Before arriving at the final destination, the number of intermediate servers.

2. Getting to each hop takes some time.

3. The IP & sometimes the name of each hop.

You can see how your internet requests alter based on where you’re browsing the web with TRACERT. It’s also helpful in diagnosing a faulty router or switch on a home network.

7. POWERCFG: Power Configuration

It seems like your laptop is constantly running out of juice. Power settings may be optimized to the maximum extent practicable. In Windows, there’s a command-line utility named POWERCFG (power configuration). Powercfg – energy is a command-line utility that provides a comprehensive report on a computer’s power use.

As a result of the procedure, you’ll be able to discover if there are any warnings or problems that could help you enhance your system’s power efficiency.

These faults and warnings are detailed in the energy-report.html file.

8. SHUTDOWN: Turn Off Computer

In addition to shutting down the computer, the SHUTDOWN command allows you to customize the shutdown process. For example, as part of an IT batch job, it is frequently used as a scheduled task following updates.

If you type shutdown /i at the command prompt, a shutdown will be initiated, but the user will be given a choice to restart or do a complete shutdown via a graphical user interface. Shutdown /s is a simple way to avoid the appearance of a graphical user interface.

Other arguments can be used to log off, hibernate, restart, and more. You may see them all by typing shutdown without any arguments.

9. SYSTEMINFO: System Information

Use the SYSTEMINFO command to learn about your computer’s hardware, including its CPU and operating system version.

This command performs a system scan and gathers the most relevant information. The material is presented in an easy-to-follow way.

10. SFC: System File Checker

You can use a Windows command to check the integrity of your system files if you’re afraid that a virus or other malware has corrupted them.

It will help if you run CMD as an administrator to use it (right-click and choose Run as Administrator). You can check the integrity of all protected system files by using SFC /SCANNOW. Repairs are made using system files backed up if a problem is discovered.

The SFC command also lets you:

/VERIFYONLY: Check the integrity but do not repair the files.

/SCANFILE: Scan specific files & fix them if corrupted.

/VERIFYFILE: Verify the integrity of particular files but do not repair them.

/OFFBOOTDIR: The offline boot directory can be repaired with this.

/OFFWINDIR: Use this to fix a Windows directory that has gone offline.

/OFFLOGFILE: A log file with scan findings can be saved to a specific path.

The scan can take up to 10 / 15 mins, so give it time.

11. NET USE: Map drives

Open File Explorer, right-click on This PC, then use the Map Network Drive procedure to create a new network drive. You can, however, accomplish precisely the same thing by using the NET USE command.

For instance, if you have a shared folder on a computer on your network called \\OTHER-COMPUTER\SHARE\, you can map this as your Z: drive by typing the command:

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

Using the persistent switch tells your computer that you want this drive to be remapped every time you log in.

12. CHKDSK: Check Disk

This function can scan an entire disc, whereas the SFC command only examines the integrity of system files.

Type CHKDSK /f C: in a command prompt as an administrator, check and fix any issues with your C: drive.

This command checks for things like:

File fragmentation
Disk errors
Bad sectors

Disk faults can be repaired using this command (if possible). The scan’s status and the actions taken will be displayed when the command is complete.

13. SCHTASKS: Schedule Tasks

It’s possible to schedule tasks in Windows using a built-in wizard. For instance, you might want to run a BAT script at C:temp every day at noon.

You’d have to use the Scheduled Task wizard to set this up. Alternatively, you may type the command SCHTASKS to set it up.

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

The scheduled switch allows minute, hour, daily, and monthly arguments. The /MO command is used to set the frequency.

If you typed the command correctly, you would see the response, SUCCESS: The scheduled task “Example” has successfully been created.

14. ATTRIB: Change File Attributes

Right-clicking on a file in Windows allows you to edit the file’s attributes. However, the ATTRIB command can be used instead of searching for the file attribute.

To set File1.bat as a hidden, read-only file, type ATTRIB +R +H C:tempFile1.bat.

If you don’t notice an error message, the command has been executed successfully.

Other Windows CMD Commands

As you can see, the Windows CMD Commands prompt has a wide range of valuable and robust capabilities if you know the correct commands.

You probably are surprised to learn that even more commands will allow you to perform things you didn’t know you could do by simply typing a command.

ALSO READ: Screenshot on Windows

BITSADMIN: File transfers can be initiated through the network or the Internet, and the status of those transfers can be monitored.

COLOR: Change the color of the command line window’s backdrop.

COMP: Observe the differences between any two files by comparing their contents.

FIND/FINDSTR: Any ASCII file can be searched for strings.

PROMPT: Change the command prompt to something other than C:>.

TITLE: Alter the command prompt’s window title.

REGEDIT: Edit keys in the Windows registry (use with attention).

ROBOCOPY: A robust file copy utility built right into Windows.

Well, if you would prefer to learn more about the Windows CMD Commands present in the most recent version of the Windows OS, Microsoft provides a complete list.

Exit mobile version