If you’re preparing for the CompTIA A+ Core 2 (220-1202) exam, Windows command line commands are non-negotiable. They show up in multiple-choice questions, drag-and-drop scenarios, and — most importantly — in performance-based questions (PBQs) where you’ll need to actually demonstrate what a command does. The exam expects you to know not just what commands exist, but when and why to use them. With up to 90 questions in 90 minutes and a passing score of 700/900, you can’t afford to wing it. Let’s break this down so you walk into the exam room confident.
Why the Command Line Matters on CompTIA A+
The Windows command line isn’t just a legacy tool — it’s a diagnostic powerhouse that IT technicians rely on daily. On the CompTIA A+ Core 2 exam, command line knowledge falls primarily under the Operating Systems domain (22%) and the Software Troubleshooting domain (22%). That’s nearly half the exam where this knowledge could show up. More critically, performance-based questions (PBQs) often simulate a command prompt environment where you’re expected to type or select the correct command to solve a real-world problem.
Understanding these commands in context — not just memorizing their names — is what separates candidates who pass from those who have to retake the exam.
Essential Windows Command Line Commands for CompTIA A+
File and Directory Navigation
- cd — Change directory. Use
cd Documentsto move into a folder orcd ..to go up one level. - dir — Lists files and folders in the current directory, similar to
lsin Linux. Great for verifying what’s in a directory during troubleshooting. - md / mkdir — Creates a new directory. Useful when setting up folder structures in scripts or troubleshooting tasks.
- rd / rmdir — Removes a directory. Use
rd /s /q foldernameto silently delete a folder and all its contents. - copy / xcopy / robocopy — Copy files locally or across a network. robocopy is the most powerful, supporting mirror backups and resumable transfers — worth knowing for the exam.
System Information and Diagnostics
- ipconfig — Displays IP address, subnet mask, and default gateway. Use
ipconfig /allfor full details including MAC address and DHCP server. Useipconfig /releaseandipconfig /renewto refresh a DHCP lease. - ping — Tests network connectivity. If you can ping a local IP but not a domain name, suspect a DNS issue. That logical reasoning is exactly what the exam tests.
- tracert — Traces the route packets take to a destination, helping identify where a network connection is failing.
- nslookup — Queries DNS servers to resolve domain names. Essential for diagnosing DNS resolution problems.
- netstat — Displays active connections and listening ports. Use
netstat -anto spot suspicious open ports during a malware investigation. - systeminfo — Outputs detailed hardware and OS information including uptime, RAM, and installed hotfixes. Handy for remote diagnostics.
Disk and File System Commands
- chkdsk — Scans and repairs file system errors and bad sectors. Use
chkdsk C: /f /rto fix errors and recover readable data from bad sectors. This runs on reboot for the system drive. - sfc /scannow — System File Checker scans Windows system files for corruption and repairs them using cached copies. This is a go-to command for fixing a corrupted OS without reinstalling.
- diskpart — A powerful partition management tool. Can initialize disks, create partitions, and format volumes. Be cautious — there’s no undo.
- format — Formats a drive with a specified file system (e.g., NTFS, FAT32, exFAT).
Process and Task Management
- tasklist — Shows all running processes, similar to what you’d see in Task Manager but scriptable.
- taskkill — Force-terminates a process by name or PID. Use
taskkill /im notepad.exe /fto kill Notepad forcefully. - shutdown — Remotely or locally shut down or restart a machine. Use
shutdown /r /t 0for an immediate restart.
User and Permission Commands
- net user — Manages local user accounts. You can create, delete, or modify accounts and passwords from the command line.
- net localgroup — Manages local group memberships. Useful for adding users to the Administrators group.
- gpupdate /force — Forces an immediate Group Policy refresh. Common in enterprise troubleshooting scenarios.
Windows vs. Linux: Know the Differences
The CompTIA A+ Core 2 exam also tests basic Linux command knowledge, and a common trap is confusing Windows and Linux syntax. For example, on Linux, you’d use chmod to modify file permissions (read, write, execute) — a command that has no direct Windows CMD equivalent (Windows uses icacls). Similarly, navigating directories uses ls in Linux versus dir in Windows. The exam may present both environments, so understand which commands belong to which OS.
Test Your Knowledge
Question 1: A Windows PC is showing corrupted system files after a failed update. Which command-line tool should you run first to repair them without reinstalling the OS?
- chkdsk /f
- sfc /scannow
- diskpart
- gpupdate /force
Answer: B — sfc /scannow. The System File Checker scans protected Windows system files and replaces corrupted ones from a local cache. chkdsk handles disk errors, not OS file corruption. This is a classic Core 2 troubleshooting scenario.
Question 2: You’re troubleshooting a Windows machine that can access local network resources but cannot browse websites. After running ipconfig, the IP address looks correct. What command should you run next to investigate DNS resolution?
- tracert 8.8.8.8
- netstat -an
- nslookup google.com
- ping 127.0.0.1
Answer: C — nslookup google.com. Since the IP is correct and local resources work, the issue is likely DNS. nslookup queries DNS directly and will reveal whether the DNS server is responding correctly. This logical troubleshooting flow is exactly what CompTIA A+ PBQs test.
Want more practice? Certcy has 110+ questions like these — try them free.
Key Study Tips for Command Line Questions
- Practice typing, not just reading. Open Command Prompt (or PowerShell) on your own machine and run each command. Muscle memory matters for PBQs.
- Learn the switches. The exam doesn’t just ask what a command does — it asks which flag achieves a specific result. Know
/f,/r,/all, and/scannowfor the most common commands. - Understand the scenario, not just the syntax. When you see a question about a slow PC with possible disk errors, you should immediately think
chkdsk. Map commands to real-world problems. - Don’t neglect Linux basics. Core 2 expects you to recognize commands like
chmod,chown, andls— even if Windows is the primary OS focus.
Frequently Asked Questions
Which CompTIA A+ exam covers Windows command line commands?
Windows command line commands are tested primarily on the Core 2 (220-1202) exam, particularly in the Operating Systems domain (22%) and Software Troubleshooting domain (22%). You’ll also encounter them in performance-based questions (PBQs) that simulate real troubleshooting scenarios. The Core 2 passing score is 700 out of 900, and you have 90 minutes to answer up to 90 questions.
Do I need to memorize every command switch for CompTIA A+?
You don’t need to memorize every possible switch, but you should know the high-value ones cold: ipconfig /all, ipconfig /release and /renew, chkdsk /f /r, sfc /scannow, and net user. Focus on understanding what each switch does in context, because PBQs will give you a scenario and expect you to choose the right combination.
Are performance-based questions (PBQs) common on CompTIA A+?
Yes. CompTIA A+ is known for including PBQs — interactive simulations where you configure settings, navigate interfaces, or type commands to solve a problem. These questions appear at the beginning of the exam and are weighted more heavily. Practicing command line commands hands-on (not just reading about them) is the best preparation for PBQs.
What’s the difference between chkdsk and sfc /scannow?
chkdsk checks the physical disk for file system errors, bad sectors, and logical disk issues. It operates at the disk level. sfc /scannow (System File Checker) operates at the OS level, scanning Windows system files for corruption and restoring them from a cached copy. In practice, you’d run sfc /scannow first when you suspect OS corruption, and chkdsk when you suspect hardware or disk problems. The CompTIA A+ exam will test your ability to choose between them based on symptoms.
Ready to turn this knowledge into exam-ready confidence? Download Certcy free and practice CompTIA A+ command line questions with real exam-style scenarios, spaced repetition, and an AI study plan that targets your weak spots. With 110+ free questions across all 8 Core 2 domains, offline mode, and gamified XP tracking, Certcy is the study partner that keeps you accountable — all the way to passing day. You’ve got this.
Ready to Pass Your Certification?
Practice with 1,890 expert-written questions across 17 CompTIA, ISC2, AWS, and Cisco exams.
Free to start, no credit card required.