Fatskills
Practice. Master. Repeat.
Study Guide: CompTIA A+ Core Certification: Windows Command Prompt Commands
Source: https://www.fatskills.com/comptia-a-exam/chapter/comptia-a-core-certification-windows-command-prompt-commands

CompTIA A+ Core Certification: Windows Command Prompt Commands

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~4 min read
  Navigation Commands
cd (chdir) Changes the working directory (folder).
dir Displays a list of the current directory and subdirectories.
md (mkdir) Creates a directory on the drive.
rmdir Removes an empty directory.
cd .. Navigates to the previous directory.
C:\ or D:\ or X:\ Takes you to the command prompt of the drive letter.
  Command-Line Tools
ipconfig C:\Users>ipconfig Displays TCP/IP network configuration information for each network adapter (both physical and virtual) on the device.
ping Sends IP packets to check network connectivity: C:\Users>ping cisco.com (reply follows) Pinging cisco.com [2001:420:1101:1::185] with 32 bytes of data: Reply from 2001:420:1101:1::185: time=64ms Reply from 2001:420:1101:1::185: time=65ms Reply from 2001:420:1101:1::185: time=65ms Reply from 2001:420:1101:1::185: time=69ms Ping statistics for 2001:420:1101:1::185: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 64ms, Maximum = 69ms, Average = 65ms
hostname Returns the computer name of the local device. C:\Users>hostname PC of RMcD
netstat Displays a list of active TCP connections on a local network. C:\Users>netstat Active Connections Protocol Local Address     Foreign Address    State TCP  10.0.0.34:49554    12.64.180.116:https  ESTABLISHED (example output. Several lines omitted here)
nslookup Gathers the network’s Domain Name System (DNS) information. C:\Users>nslookup Default Server: cdns01.ISPprovider.net Address: 2101:568:feed::1
chkdsk* Scans the specified drive for errors and repairs them. C:\Windows>chkdsk ( Note: Run as Administrator) The type of the file system is NTFS. WARNING! /F parameter not specified. Running CHKDSK in read-only mode. Stage 1: Examining basic file system structure ... 895232 file records processed. File verification completed.
net user Manages user accounts (add, remove, change). C:\Users>net user User accounts for \\PC-RMcD admin          Administrator      ctctechs DefaultAccount     The command completed successfully.
net use Connects to shared folders, similar to mapping a network drive. C:\Users>net use New connections will be remembered. There are no entries in the list.
tracert Similar to ping, but returns path information to an IP address destination. Similar to the traceroute command in macOS and Linux. Can be used for troubleshooting connectivity across the Web. C:\Users>tracert Cisco.com Tracing route to cisco.com [2001:420:1101:1::185] over a maximum of 30 hops: 1   5 ms 2601:602:cc01:16e0:623d:26ff:feb9:8830 2  13 ms  12 ms  12 ms 2001:558:4082:c6::1 3  12 ms  13 ms  13 ms 2001:558:a2:601b::1 (20 hops in output omitted)
format ( Note: Do not practice this command on an operational computer!) Creates or re-creates the specified file system on recordable or rewritable storage (magnetic, flash, or optical media) and overwrites the contents and file table of the drive.
xcopy Copies one or more files and folders to another folder or drive. C:\Users>XCOPY source [destination] [/A | For format and function table, type: C:\Users>help xcopy
copy Copies one or more files to another folder or drive.
robocopy Robust File Copy for Windows. Copies or moves files/folders; can be configured with various optional GUIs. Usage :: ROBOCOPY source destination [file [file]...] [options] source :: Source Directory (drive:\path or \\server\share\path). destination :: Destination Dir (drive:\path or \\server\share\path). file :: File(s) to copy (names/wildcards: default is “*.*”). For options table, use : C:\Users>help robocopy
gpupdate Refreshes Group Policy on local or Active Directory systems. C:\Users>gpupdate Updating policy...
gpresult Displays the resultant set of policy for the specified computer and user. For the usage guide, type: C:\Users>gpresult /?.
shutdown ( Note: Do not practice this command on an operational computer!) Shuts down the computer. For usage, enter: C:\Users>shutdown /?.
sfc* Scans system files and replaces damaged or missing files. C:\Windows>sfc /scannow (run as administrator) Beginning system scan. This process will take some time. Beginning verification phase of system scan. Verification 4% complete.
[command name]/? Displays help for the specified command name—for example, xcopy /?.
diskpart* ( Note: Do not practice this command on an operational computer!) Creates, removes, and manages disk partitions.
pathping Similar to traceroute but provides information on network latency along the path to the destination. pathping traces and tests network connections to an IP address. C:\Users>pathping cisco.com
taskkill Stops specified task(s) on a local or remote computer. C:\Users>TASKKILL /IM notepad.exe
winver Returns version information of the current Windows OS. C:\Users>winver


ADVERTISEMENT