15 Useful Windows Commands You Should Know

573
15 Useful Windows Commands You Should Know

Here we can see, “15 Useful Windows Commands You Should Know”

The prompt remains a robust Windows tool. Here are the foremost helpful CMD commands every Windows user must know.

The prompt is slowly disappearing from the Windows interface and permanently reasons: CMD commands are an antiquated and mostly unnecessary tool from an era of text-based input. But many commands remain functional, and Windows 8 and 10 even added new features.

Here we present the essential commands every Windows user must know.

Not sure how to access the Windows prompt, forgot basic Windows commands, or would like to understand how to see an inventory of switches for every knowledge (aka quick codes)? Ask our beginners guide to the Windows instruction for instructions.

Windows Command Prompt Commands

If you haven’t poked around inside Windows’ instruction, you’re missing out. There are many handy tools you’ll use if you recognize the right things to type.

1. Assoc

Most files in Windows are related to a selected program that’s assigned to open the file by default. At times, remembering these associations can become confusing. You’ll remind yourself by entering the command assoc to display a complete list of filename extensions and program associations.

You can also extend the command to vary file associations. For instance, assoc .txt= will change the file association for text files to whatever program you enter after the equal sign. The assoc command itself will reveal both the extension and program names, which can assist you in correctly use this command.

Also See:  How to: Fix High Pitch Sound From Speakers on Windows 10

In Windows 10, you’ll view a more user-friendly interface that allows you to change file type associations on the spot. Head to Settings (Windows + I) > Apps > Default apps > Choose default app by file type.

2. Cipher

Deleting files on a mechanical disk drive doesn’t delete them in the least. Instead, it marks the files as not accessible and, therefore, the space they took up as free. The files remain recoverable until the system overwrites them with new data, which may take a while.

The cipher command, however, wipes a directory by writing random data to that. For instance, to brush your C drive, you’d use the cipher /w:d command, which can wipe free space on the drive. The command doesn’t overwrite undeleted data, so you’ll not wipe out the files you would like by running this command.

3. Driverquery

Drivers remain among the foremost necessary software installed on a PC. Improperly configured, missing, or old drivers in Windows can cause all kinds of trouble, so it’s good to possess access to an inventory of what is on your PC.

That’s precisely what the driver query command does. You’ll extend it to drive query -v to get more information, including the directory during which the driving force is installed.

4. File Compare

You can use this command to spot differences in text between two files. It’s beneficial for writers and programmers trying to seek out small changes between two file versions. Type fc then the directory path and file name of the 2 files you would like to match.

You can also extend the command in several ways. Typing /b compares only binary output, /c disregards the case of text within the comparison, and /l only compares ASCII text.

So, for instance, you’ll use the following:

fc /l "C:\Program Files (x86)\example1.doc" "C:\Program Files (x86)\example2.doc"

The above command compares ASCII text in two Word documents.

5. Ipconfig

This command relays the IP address that your computer is currently using. However, if you’re behind a router (like most computers today), you’ll instead receive the local network address of the router.

Still, ipconfig is beneficial due to its extensions. ipconfig /release followed by ipconfig /renew can force your Windows PC into posing for a replacement IP address, which is beneficial if your computer claims one isn’t available. You’ll also use ipconfig /flushdns to refresh your DNS address. These commands are great if the Windows network troubleshooter chokes, which does happen once in a while.

6. Netstat

Entering the command netstat will provide you with an inventory of currently open ports and related IP addresses. This command also will tell you what state the port is in; listening, established, or closed.

This is an excellent command for once you’re trying to troubleshoot devices connected to your PC or when you fear a Trojan infected your system and you’re trying to locate a malicious connection.

7. Ping

Sometimes, you would like to understand whether or not packets are making it to a selected networked device. That’s where ping comes in handy.

Typing ping followed by an IP address or web domain will send a series of test packets to the required address. If they arrive and are returned, you recognize the device can communicate together with your PC; if it fails, you acknowledge that there is something blocking communication between the device and your computer. This will assist you in deciding if the basis of the difficulty is an improper configuration or a failure of network hardware.

8. PathPing

This is a more advanced version of ping that’s useful if there are multiple routes between your PC and, therefore, the device you’re testing. Like ping, you employ this command by typing pathping followed by the IP address, but unlike ping, pathping also relays some information about the route the test packets take.

9. Tracert

The tracert command is analogous to pathping. Once more, type tracert followed by the IP address or domain you want to trace. You’ll receive information about each step within the route between your PC and, therefore, the target. However, unlike pathping, tracert also tracks what proportion time (in milliseconds) each hop between servers or devices takes.

10. Powercfg

Powercfg may be a very powerful command for managing and tracking how your computer uses energy. You’ll use the command powercfg hibernate on and powercfg hibernate off to manage hibernation. You’ll also use the command powercfg /a to look at the power-saving states currently available on your PC.

Also See:  The Essential Windows Run Commands Cheat Sheet

Another helpful command is powercfg /device query s1_supported, which displays an inventory of devices on your computer that support connected standby. When enabled, you’ll use these devices to bring your computer out of standby, even remotely.

You can enable this by selecting the device in Device Manager, opening its properties, getting to the Facility Management tab, then checking the Allow this device to wake the pc box.

Powercfg /lastwake will show you what device last woke your PC from a sleep state. You’ll use this command to troubleshoot your PC if it seems to wake from sleep randomly.

You can use the powercfg /energy command to create an in-depth power consumption report for your PC. The information saves to the directory indicated after the command finishes.

This report will let you know of any glitches that may increase power consumption, like devices blocking specific sleep modes or poorly configured to reply to your power management settings.

Windows 8 added powercfg /battery report, which provides an in-depth analysis of battery use, if applicable. Normally output to your Windows user directory, the report provides details about the time and length of charge and discharge cycles, lifetime average battery life, and estimated battery capacity.

11. Shutdown

Windows 8 introduced the shutdown command that you guessed it shuts down your computer.

This is, of course, redundant with the already easily accessed shutdown button, but what’s not redundant is that the shutdown /r /o command, which restarts your PC and launches the Advanced Start Options menu, is where you’ll access Safe Mode and Windows recovery utilities. This is often useful if you would like to restart your computer for troubleshooting purposes.

12. Systeminfo

This command will offer you an in-depth configuration overview of your computer. The list covers your OS and hardware. For instance, you’ll search the first Windows installation date, the last boot time, your BIOS version, total and available memory, installed hotfixes, network card configurations, and more.

Use systeminfo /s followed by the hostname of a computer on your local network to remotely grab the knowledge for that system. this might require additional syntax elements for the domain, user name, and password, like this:

systeminfo /s [host_name] /u [domain]\[user_name] /p [user_password]

13. System File Checker

System File Checker is an automatic scan and repair tool that focuses on Windows system files.

You will get to run the prompt with administrator privileges and enter the command SFC /scannow. If SFC finds any corrupt or missing files, it’ll automatically replace them using cached copies kept by Windows for this purpose alone. The command can require a half-hour to run on older notebooks.

14. prompt

Would you wish to customize your prompt to incorporate instructions or certain information? With the prompt command, you can!

Try this one:

prompt Your wish is my command: 

You can add the present time, date, drive and path, Windows version number, then far more.

prompt $t on $d at $p using $v: 

Type “prompt” to reset your prompt to default settings or restart the prompt. Unfortunately, these settings aren’t permanent.

15. schtasks

schtasks is your prompt access to the Task Scheduler, one among many underrated Windows administrative tools. While you’ll use the GUI to manage your scheduled tasks, the prompt allows you to copy&paste complex commands to line up multiple similar functions without having to click through various options. Ultimately, it’s much easier to use once you’ve committed key parameters to memory.

For example, you’ll schedule your computer to reboot at 11 pm every Friday:

schtasks /create /sc weekly /d FRI /tn "auto reboot computer weekly" /st 23:00 /tr "shutdown -r -f -t 10"

To complement your weekly reboot, you could schedule tasks to launch specific programs on startup:

schtasks /create /sc onstart /tn "launch Chrome on startup" /tr "C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe"

To duplicate the above command for various programs, just copy, paste, and modify it as required.

Windows 8 Only: Recovery Image

Virtually all Windows 8/8.1 computers ship from the factory with a recovery image, but the image may include bloatware you’d rather not have re-installed. Once you’ve uninstalled the software, you’ll create a replacement image using the resume command. Entering this command presents a detailed explanation of the way to use it.

You must have administrator privileges to use the resume command, and you’ll only access the custom recovery image you create via the Windows 8 refresh feature.

In Windows 10, system recovery has changed. Windows 10 systems don’t accompany a recovery partition, making it more critical than ever to copy your data.

Conclusion 

I hope you found this helpful guide. If you’ve got any questions or comments, don’t hesitate to use the shape below. 

User Questions:

  1. What does * * mean in CMD?

In this case, we used the * wildcard to mean “all files within the current directory.” This command prints the road containing the given string, and if there’s entirely one, enter the list, the name of the file where it had been found. To see files in subdirectories, too, use the -r flag with the grep command.

2.Who command in Windows?

Windows don’t have command equivalent to “WHO” command of linux, but you can use below commands. use quser to check active settions. and to check active remote sessions you can use command “netstat”. check port 3389 if active.

3.What does C do in CMD?

Alternatively referred to as Cmd+C, Command+C is a keyboard shortcut used to copy highlighted text or other object to the clipboard in a graphical user environment. On Windows computers, the keyboard shortcut to copy is Ctrl + C 

Also See:  Samsung Galaxy Unpacked Event could be for the Galaxy S21 FE
  1. What are the foremost helpful instruction prompts for troubleshooting during a Windows environment?

What are the most useful command line prompts for troubleshooting in a Windows environment? from sysadmin

  1. Essential Windows CMD Command you ought to Know

Essential Windows CMD Command You Should Know from coolguides