In Windows operating systems, the Command Prompt is a program that is used to execute entered commands and perform advanced administrative functions.
Some helpful commands are listed below:
1. ASSOC: Fix File Associations
This command helps in listings all files extension that runs in the computer. Using this we can also find the files which are corrupted.
2. FC: File Compare
The FC command compares either the given fiels is an ascii or a binary file and will list all of the differences that it finds.
Syntax: Fc /a filename1 filename2
This will compare two ascii files.
Syntax: Fc /b Picture1.jpg Picture2.jpg
This will do a binary compare on two images.
3.IPCONFIG: IP Configuration
This command helps to find the ip address.
4.NETSTAT: Network Statistics
This command helps in listing connections which are established such as TCP and UDP ports.
5.PING: Send Test Packets
This command helps while troubleshooting LAN connectivity issues.
Syntax: ping google.com or ping ipaddress(171.24….)
6. TRACERT: Trace Route
This command helps in finding the foot print of routing hops.
Syntax: tracert google.com
7. SHUTDOWN: Turn Off Computer
This command helps to shutdown the system.
Syntax: shutdown /i (remote system shutdown)
shutdown /s (current system shutdown)
8. SYSTEMINFO: System Information
This command helpf to view the hardware information of the system.
9. SFC: System File Checker
This command helpf to check operating system file integrity.
Syntax: SFC /scan
other useful commands of SFC are listed below:
/VERIFYONLY: Check the integrity but don’t repair the files.
/SCANFILE: Scan the integrity of specific files and fix if corrupted.
/VERIFYFILE: Verify the integrity of specific files but don’t repair them.
/OFFBOOTDIR: Use this to do repairs on an offline boot directory.
/OFFWINDIR: Use this to do repairs on an offline Windows directory.
/OFFLOGFILE: Specify a path to save a log file with scan results.
10. NET USE: Map drives
If you have a share folder on a computer on your network called \\OTHER-COMPUTER\SHARE\, you can map this as your own Z: drive by typing the command:
Syntax: Net use Z: “\\OTHER-COMPUTER\SHARE” /persistent:yes
11. CHKDSK: Check Disk
This command helps in fixing logical error.
Syntax: chkdsk c: /f /r /x
12. SCHTASKS: Schedule Tasks
This command helps to schedule a task for a specific time. This is basically used for script writing or installation.
Syntax: schtasks /Create /SC HOURLY /MO 12 /TR Example /TN c:\temp\sample.bat
13. ATTRIB: Change File Attributes
This command helps in finding the status of the file and drive.
14. COLOR: Change the background color
This command helps to change the background color of the command prompt window.
Syntax: color 3f
Color attributes are specified by TWO hex digits — the first
corresponds to the background; the second the foreground. Each digit
can be any of the following values:
0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
15. ROBOCOPY: A powerful file copy utility built right into Windows.
This command helps CLI based file transfer.
Syntax: ROBOCOPY sourcepath destinationpath