Sub topic 1
Windows Command-Line and Management Tools for the CompTIA A+ Core 2 Exam
Prerequisites
Assume you know basic Windows navigation, files, folders, drives, IP addresses, DNS, and administrator permissions. Use an elevated Command Prompt only when a command requires system-level changes. To open one, search for Command Prompt, right-click it, and select Run as administrator. The title bar usually includes “Administrator.”
Command syntax commonly follows this pattern:
command target /switchUse command /? to display built-in help. For example, robocopy /? lists its options. Switches change command behavior, and paths containing spaces require quotation marks.
Files and Folders
dir lists directory contents. cd changes the current folder. md creates a folder, and rd removes an empty folder. The rd /s option removes a folder and its contents, so verify the path before using it.
dir
cd C:\Users\Public
md Practice
cd Practice
cd ..
rd Practicecopy copies individual files. xcopy handles folders and offers more options. robocopy is preferred for dependable folder copies, retries, and logs.
copy report.txt D:\Backup\
xcopy C:\Data D:\Backup\Data /E /I
robocopy C:\Data D:\Backup /E /R:2 /W:5Network Configuration and Diagnostics
ipconfig displays IP settings. Use /all for adapter and DHCP details. hostname prints the computer name. ping tests reachability and basic TCP/IP operation.
ipconfig /all
hostname
ping -n 4 127.0.0.1
ping -n 4 example.com
tracert -d example.com
pathping example.com
nslookup example.com
netstat -anotracert shows the route to a destination. pathping combines route and packet-loss testing. nslookup queries DNS directly. netstat -ano lists connections and their owning process IDs.
Shares and Accounts
net use maps or removes shared drives. net user displays or manages local accounts. Administrative changes require elevation.
net use Z: \\server\share /persistent:no
net use Z: /delete
net userDisk Commands
chkdsk C: /f checks and repairs file-system errors. format erases and prepares a volume, so confirm the drive letter first. diskpart manages disks and partitions; list disk and list volume are inspection commands. Never use clean unless the selected disk is unquestionably correct.
diskpart
list disk
list volume
exitExercise
Which command displays full adapter details, including DNS and DHCP information?
Show answer
ipconfig /all.