0% found this document useful (0 votes)
234 views7 pages

15 CMD Commands Every Windows User Should Know

This document provides a summary of 15 useful CMD commands for Windows users. Some of the most useful commands include ASSOC to display file extensions and associated programs, Cipher to wipe free space on drives, Driverquery to view installed drivers, and Ipconfig to view network settings like IP address. Other commands mentioned help compare files, view network connections, test network connectivity, manage power settings, restart or shut down computers, and create system restore images. The document recommends these commands can help troubleshoot issues and manage system settings from the command line.

Uploaded by

Reindolf Chambas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
234 views7 pages

15 CMD Commands Every Windows User Should Know

This document provides a summary of 15 useful CMD commands for Windows users. Some of the most useful commands include ASSOC to display file extensions and associated programs, Cipher to wipe free space on drives, Driverquery to view installed drivers, and Ipconfig to view network settings like IP address. Other commands mentioned help compare files, view network connections, test network connectivity, manage power settings, restart or shut down computers, and create system restore images. The document recommends these commands can help troubleshoot issues and manage system settings from the command line.

Uploaded by

Reindolf Chambas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

7/12/2016

15CMDCommandsEveryWindowsUserShouldKnow

15 CMD Commands Every Windows User Should Know


Written by Matt Smith
July 25, 2014

(http://www.makeuseof.com/tag/author/mattsmith/)

Microsoft has slowly but surely pushed the command line (http://www.makeuseof.com/tag/10-windows-command-line-tips-tricks-youshould-definitely-check-out/) aside in the Windows interface. This is not without reason, as its an antiquated and mostly unnecessary tool
from an eraof text-based input that has long passed.
But there still aresome commands that remain useful, and Windows 8 even added new features. Hereare the commands every Windows
user needs to know.
In case youre not sure how toaccessthe command prompt, forgot basic commands, or would like to know how to seea list of switchesfor
each command, you can refer to our beginners guide to the Windows command line (http://www.makeuseof.com/tag/a-beginners-guide-tothe-windows-command-line/) for instructions.

ASSOC

Most files in Windows are associated with a specific program that is assigned to open the file by default. At times, remembering these
associations can become confusing. You can remind yourself by entering the command assoc to display a full list of file extensions and the
programs theyre connected with.

http://www.makeuseof.com/tag/15cmdcommandseverywindowsuserknow/

1/7

7/12/2016

15CMDCommandsEveryWindowsUserShouldKnow

You can also extend the command to change file associations. For example, 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 names and program names,
which will help you properly use this command. You can probably do this more easily in the GUI, but the command line interface is a perfectly
functional alternative.

Cipher

Deleting files on a mechanical hard drivedoesnt really delete them at all (http://www.makeuseof.com/tag/securely-delete-files-hdd-ssdwindows/). Instead, it marks the files as no longer accessible and the space they took up as free. The files remain recoverable until theyre
overwritten with new data, which can take some time.
The cipher command (http://www.makeuseof.com/tag/5-windows-7-features-you-didnt-know-existed/), however, can be used to wipe a
directory by writing random data to it. To wipe your C drive, for example, youd use the command cipher /w:c, which will wipefree space
on the drive. The command does not overwrite undeleted data, so you will not wipe out files you need by running this command.
Theres also a host of other cipher commands, however, they are generally redundant with Bitlocker enabled versions of Windows.

Driverquery

http://www.makeuseof.com/tag/15cmdcommandseverywindowsuserknow/

2/7

7/12/2016
Email
Sign
up for remain
more tipsamong
and awesome
articles important
Drivers
the most

15CMDCommandsEveryWindowsUserShouldKnow
go
software installed on a PC.Let's
Improperly
configured or missing drivers

(http://www.makeuseof.com/tag/how-to-easily-remove-old-drivers-from-windows/) can cause all sorts of trouble, so its good to have access
to a list of whats on your PC. Thats exactly what the driverquery command does. You can extend it to driverquery -v to obtain more
information including the directory in which the driver is installed.

File Compare
This command can be used to identify differences in text between two files, and is particularly useful for writers and programmers trying to
find small changes between two versions of a file. Simply type fc and then the directory path and file name of the two files you want to
compare (http://www.makeuseof.com/tag/delete-duplicate-files-quickly-with-these-tools/).

You can also extend the command in several ways. Typing /b compares only binary output, /c disregards the case of text in the
comparison, and /l only compares ASCII text.
So, for example, you could use the following:
fc/l"C:\ProgramFiles(x86)\example1.doc""C:\ProgramFiles(x86)\example2.doc"
to compare ASCII text in two word documents.

Ipcong
This command relays the IPaddress that your computer is currently using. However, if youre behind a router (like most computers today),
youll instead receive the local network address of the router.
Still, ipconfig is useful because of its extensions. ipconfig /release followed by ipconfig /renewcan force your Windows PC into asking for
a new IPaddress, which is useful if your computer claims one isnt available. You can also use ipconfig /flushdns to refresh your DNS
address. These commands are great if the Windows network troubleshooter chokes, which does happen on occasion.

Netstat
Entering the command netstat -an will provide you with a list of currently open ports and related IPaddresses
(http://www.makeuseof.com/tag/find-out-whos-eating-your-bandwidth-with-these-tips/). Youll also be told what state the port is in
listening, established or closed. This is a great commandif youre trying to troubleshoot the devices your PC is connected to or youre afraid
http://www.makeuseof.com/tag/15cmdcommandseverywindowsuserknow/

3/7

7/12/2016
Sign
up forinfected
more tips with
and awesome
articles
youre
a Trojan
and

15CMDCommandsEveryWindowsUserShouldKnow
Email
Let's go
are
trying tolocate a malicious connection.

Ping

Sometimes, you need to know whether or not packets are making it to a specific networked device. Thats where ping comes in handy.
Typing ping followed by an IPaddress or web domain will send a series of test packets to the specified address. If they arrive and are
returned, you know the device is capable of communicating with your PC; if it fails, you know that theres something blocking communication
between the device and your computer. This canhelp you decide if an issue is caused by improper configuration or a failure of network
hardware.

Pathping
This is a more advanced version of ping thats useful if there are multiple routers between your PC and the device youre testing. Like ping,
you use this command by typing pathping followed by the IPaddress, but unlike ping, pathping also relays some information about the
route the test packets take.

Tracert

The tracert command is similar to pathping. Once again, type tracert followed by the IP address or domain youd like to trace. Youll
receive information about each step in the route between your PC and the target. Unlike pathping, however, tracert also tracks how much
time (in milliseconds) each hop between servers or devices takes.

http://www.makeuseof.com/tag/15cmdcommandseverywindowsuserknow/

4/7

7/12/2016

15CMDCommandsEveryWindowsUserShouldKnow

Powercfg
Powercfg is a very powerful command for managing and tracking how your computer uses energy. You can use the command powercfg
/hibernate on and powercfg /hibernate off to manage hibernation, and you can also use the command powercfg /a to view the powersaving states currently available on your PC.
Another useful command is powercfg /devicequery s1_supported which displays a list of devices on your computer that support connected
standby. When enabled, these devices can be used to bring your computer out of standby even remotely. You can enable this by selecting
the device in Device Manager, opening its properties, going to the Power Management tab and then checking the Allow this device to wake
the computer box.
Powercfg /lastwake will show you what device last woke your PC from a sleep state. You can use this command to troubleshoot your PC if
it seems to wake from sleep at random (http://www.makeuseof.com/tag/stop-windows-computer-randomly-waking/).

The powercfg /energy command can be used to build a detailed power consumption report for your PC, which is output toa directory
indicated after the command finishes. This report will let you know of any system faults that might increase power consumption, like devices
that are blocking certain sleep modes, or which arent properly configured to respondto your power management settings.
Windows 8 added powercfg /batteryreport, which provides a detailed 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.

Shutdown
As of Windows 8/8.1 there is now a shutdown command (http://www.makeuseof.com/tag/10-clever-ways-optimize-windows-shutdownprocess/) that you guessed it! shuts down your computer. This is of course redundant with the already easily accessed shutdown button,
but whats not redundant is the shutdown /r /o command, which restarts your PC and launchesthe Advanced Start Options menu, which is
where you can access Safe Mode and Windows recovery utilities. This is useful if you want to restart your computer for troubleshooting
purposes.

System File Checker

http://www.makeuseof.com/tag/15cmdcommandseverywindowsuserknow/

5/7

7/12/2016

15CMDCommandsEveryWindowsUserShouldKnow

System File Checker is an automatic scan and repair tool that focuses on Windows system files. You will need to run the command prompt
with administrator privileges and enter the command sfc /scannow. If any corrupt or missing files are found, theyll be automatically
replaced using cached copies kept by Windows for just that purpose. The commandcan require a half-hour to run on older notebooks.

Recovery Image

Virtually all Windows 8/8.1 computers ship from the factory with a recovery image (http://www.makeuseof.com/tag/how-to-create-awindows-8-recovery-disk/), but theimage may include bloatware youd rather not have re-installed. Once youve un-installed the software
you can create a new image using the recimg command. Entering this command presents a very detailed explanation of how to use it. You
must have administrator privileges to use the recimg command, and you canonly access the custom recovery image you create via the
Windows 8 refresh feature (http://www.makeuseof.com/tag/how-to-restore-refresh-or-reset-your-windows-8-installation/).

Tasklist
The tasklist command can be used to provide a current list of all tasks running on your PC. Though somewhat redundant with Task
Manager (http://www.makeuseof.com/tag/mysteries-of-the-windows-task-manager-why-you-dont-need-an-alternative/), the command may
sometimes find tasks hidden from view in that utility.

Theres also a wide range of modifiers. Tasklist -svc shows services related to each task, tasklist -v can be used to obtain more detail on
each task, and tasklist -m can be used to locate.dll files associated with active tasks. These commands are useful for advanced
troubleshooting.
http://www.makeuseof.com/tag/15cmdcommandseverywindowsuserknow/

6/7

7/12/2016

15CMDCommandsEveryWindowsUserShouldKnow

Taskkill
Tasks that appear in the tasklist command will have an executable and process ID (a four-digit number)associated with them. Youcan force
stop a program usingtaskkill -im followed by the executables name, or taskkill -pid followed by the process ID. Again, this is a bit
redundant with Task Manager, but may be used to kill otherwise unresponsive or hidden programs.

Conclusion
This article doesnt cover every Windows command available. There are literally hundreds of them when all variables are included. Most,
however, are no longer useful because theyve been replaced by more convenient menus in the Windows GUI or simply arent commonly
used (telnet, for example).
You can check out our Windows command cheat sheet (http://www.makeuseof.com/pages/windows-command-prompt-commands-pdf)for
an expanded list or download Microsofts command line reference guide (http://www.microsoft.com/en-us/download/details.aspx?
id=2632)for advanced support and troubleshooting.
Which commands do you find yourself using frequently?

Share

Tweet

Pin

Stumble

Bookmark

Mail (mailto:?body=http://www.makeuseof.com/tag/15-cmd-commands-every-windows-user-know/&subject=15 CMD


Commands Every Windows User Should Know)

Join live MakeUseOf Groups on Grouvi App

Windows Tips
512 Members

Join

Windows_10
486 Members

(https://grou.vi/gec)

Best Windows Software


422 Members

Join

Join

Windows Troubleshooting
425 Members

(https://grou.vi/kec)

Computer Hardware Talk


386 Members

(https://grou.vi/mec)

http://www.makeuseof.com/tag/15cmdcommandseverywindowsuserknow/

Join
(https://grou.vi/sqm)

Join
(https://grou.vi/iec)

Master the Linux Comm


362 Members

Join
(https://grou.vi/gic)

7/7

You might also like