IT CertificationsAnswer Key

Comptia A+ Command Line Practice

50 community-sourced questions and answers. Free — no login.

Community-sourced. Answers may be wrong or out of date. Always verify with your official training portal before submitting. Not affiliated with any branch, agency, or vendor. Details.
QUESTION 1

Which of the command-line utilities listed below allows to test the reachability of a host across an IP network? a. NETSTAT b.IPCONFIG c.TRACERT d.PING

ANSWER

d.PING

QUESTION 2

The following command-line command can be used to copy one or more files from one location to another. a.SFC b.COPY c.MOVE d.PUSHD

ANSWER

b.COPY

QUESTION 3

The /R switch of the CHKDSK utility: (Select all that apply) a.Displays cleanup messages b,Locates bad sectors and recovers readable information c.Uses more system resource to perform a scan as fast as possible d.Displays the full path and name of every file on the disk e.Fixes errors on the disk

ANSWER

b,Locates bad sectors and recovers readable information e.Fixes errors on the disk

QUESTION 4

What would be the correct syntax for setting the time-out period of 60 seconds before powering off a Windows host? a.POWEROFF /t 60 b. HALT /t 60 c.REBOOT /t 60 d, SHUTDOWN /t 60

ANSWER

d, SHUTDOWN /t 60

QUESTION 5

The "Run as administrator" option in MS Windows available after right-clicking on the Command Prompt application icon allows for execution of shell commands reserved for a system administrator. a.True b.False

ANSWER

a.True

QUESTION 6

Which of the COPY command switches verifies that the new files are written correctly? a,/-Y b,/V c,/Y d,/A

ANSWER

b,/V

QUESTION 7

The "HELP [command]" syntax in Windows shell can be used for displaying help information related to any command-line tool available in Windows, including utilities that fall into the category of network command-line tools (e.g. PING, IPCONFIG, NETSTAT, and others). a.True b.False

ANSWER

b.False

QUESTION 8

Which of the following commands in Windows launches a text-based command-line partitioning utility? a.REGSVR32 b. CHKDSK c.DEFRAG d.DISKPART

ANSWER

d.DISKPART

QUESTION 9

Which of the Microsoft Windows command-line commands allow(s) for copying multiple files or entire directory trees from one directory to another and for copying files across a network? (Select all that apply) a.XCOPY b.TRACERT c.FORMAT d.ROBOCOPY e.MOVE

ANSWER

a.XCOPY d.ROBOCOPY

QUESTION 10

A Windows command-line command for managing Active Directory domains is called: a. NETDOM b. GPRESULT c.NET VIEW d.BCDEDIT

ANSWER

a. NETDOM

QUESTION 11

Which of the following command-line commands are used in Windows to create a directory or subdirectory? (Select all that apply) a.RMDIR b.MD c.MKDIR d.CD e.CHDIR f.RD

ANSWER

b.MD c.MKDIR

QUESTION 12

Which of the Windows Command Prompt commands listed below allows to display IP addresses, subnet mask, and default gateway for all adapters? a.NETSTAT b.IFCONFIG c.TRACERT d.IPCONFIG

ANSWER

d.IPCONFIG

QUESTION 13

Which SHUTDOWN command switch in Windows Command Prompt forces full system shutdown and restart of the Windows host? a. -s -r b. /r c./s r d.-i

ANSWER

b. /r

QUESTION 14

Which of the COPY command switches suppresses the confirmation prompt displayed when Windows is about to overwrite the contents of an existing file? a. /V b. /Y c./A d. /-Y

ANSWER

b. /Y

QUESTION 15

Which of the following commands in Windows can be used to display help information related to a specific command-line utility? (Select all that apply) a. [command name] HELP b. man [command name] c. [command name] info d.HELP [command name] e.[command name] /?

ANSWER

d.HELP [command name] e.[command name] /?

QUESTION 16

NETSTAT is a command-line utility which can be used for: a.Displaying active TCP/IP connections b.Testing the reachability of a remote host c. Displaying intermediary points on the packet route d.Viewing the TCP/IP configuration details

ANSWER

a.Displaying active TCP/IP connections

QUESTION 17

The /F switch of the CHKDSK utility: a.Locates bad sectors and recovers readable information b.Fixes errors on the disk c.Displays cleanup messages d.Displays the full path and name of every file on the disk

ANSWER

b.Fixes errors on the disk

QUESTION 18

Which of the following switches puts the PING command in a loop (ping the specified host until stopped)? a.-a b.-n c.-t d.-i

ANSWER

c.-t

QUESTION 19

Which of the key combinations listed below allows to stop the execution of the current command run in Windows Command Prompt? a. Ctrl+Shift+Esc b.Esc c. Ctrl+Alt+Delete d.Ctrl+C

ANSWER

d.Ctrl+C

QUESTION 20

A command-line command in Windows that displays Group Policy information for a machine or user is known as: a.NBTSTAT b. GPRESULT c. VERIFY d. GPUPDATE

ANSWER

b. GPRESULT

QUESTION 21

Microsoft Windows OS command-line utility for displaying intermediary points on the packet route is called: a. TRACERT b. ROUTE PRINT c. TASKLIST d NETSTAT e.TRACEROUTE

ANSWER

a. TRACERT

QUESTION 22

The SFC utility in Windows: a.Encrypts files and folders b.Scans for and restores corrupted system files c.Displays information about system hardware and software configuration d.Starts Windows programs from command-line interface

ANSWER

b.Scans for and restores corrupted system files

QUESTION 23

Which of the following commands in Windows change(s) the current directory to the root directory? (Select all that apply) a.CHDIR /R b.CD\ c. CHDIR\ d.CD.. e.DIR /ROOT

ANSWER

b.CD\ c. CHDIR\

QUESTION 24

Which parameter of the CD command in Windows moves the command-line prompt one folder up in the directory tree (sets the prompt at the parent folder of the current folder)? a. \ b./? c.+ d...

ANSWER

d...

QUESTION 25

Which of the following Windows command-line utilities allows to terminate tasks by process id or image name? a. TASKKILL b.SHUTDOWN c. EXIT d.TASKLIST

ANSWER

a. TASKKILL

QUESTION 26

The following command clears the Command Prompt window screen in Windows a.CLS b. CLEAR c. CLR d. CLRSCR

ANSWER

a.CLS

QUESTION 27

Which of the answers listed below refers to a Windows Command Prompt command used for uncompressing cabinet files? a.REPLACE b. EXPAND c.CONVERT d.RECOVER

ANSWER

b. EXPAND

QUESTION 28

Used without any parameters, the HELP command in Windows displays a list of system commands with a brief description of each command. True False

ANSWER

True

QUESTION 29

Which of the following network administration command-line tools can be used for DNS queries? a. EXPLORER b.NSLOOKUP c.MSINFO32 d. SERVICES.MSC

ANSWER

b.NSLOOKUP

QUESTION 30

For a newly added hard drive, this command allows to configure it with a file system so that Windows can store information on the disk. a.MSTSC b.DEFRAG c.NBTSTAT d. FORMAT

ANSWER

b.DEFRAG

QUESTION 31

Which of the command-line commands listed below allows for updating multiple Group Policy settings in Windows? a. CONVERT b. GPUPDATE c. BCDEDIT d.GPRESULT

ANSWER

b. GPUPDATE

QUESTION 32

Which parameter of the System File Checker utility in Microsoft Windows combines scanning the integrity of all protected system files with restoration of corrupted files? a./SCANFILE b./VERIFYONLY c./SCANNOW d./VERIFYFILE

ANSWER

c./SCANNOW

QUESTION 33

Windows Recovery Environment (Windows RE) offers a set of tools and utilities to troubleshoot Windows startup issues. Which of the following commands launches a tool for manual troubleshooting of problems related to master boot record (MBR), boot sector, and Boot Configuration Data (BCD) store in Windows RE Command Prompt? a. DISKPART b.BOOTREC.EXE c.CHKDSK d.FIXBOOT

ANSWER

b.BOOTREC.EXE

QUESTION 34

Which of the following command-line commands in Windows displays a list of currently running processes on the local computer or on a remote computer? a,EXPLORER b.TASKLIST c.SERVICES.MSC d. NETSTAT

ANSWER

b.TASKLIST

QUESTION 35

The following command can be used to shut down or restart local or remote hosts running Windows. a.SHUTDOWN b.TASKKILL c.EXIT d.REBOOOT

ANSWER

a.SHUTDOWN

QUESTION 36

The following command(s) can be used in Windows Command Prompt to delete a directory. (Select all that apply) a.CLS b.MKDIR c.RD d, RMDIR e. MD

ANSWER

c.RD d, RMDIR

QUESTION 37

Provided that the process ID of NOTEPAD.EXE obtained with the TASKLIST command is 1230, which of the following answers lists the correct syntax for a Windows Command Prompt TASKKILL command that would allow to close this application? a.TASKKILL /PID 1230 b.TASKKILL -IM 1230 c.TASKKILL /IM 1230 d.TASKKILL -PID 1230

ANSWER

a.TASKKILL /PID 1230

QUESTION 38

Which of the following commands exit(s) the command interpreter in Windows? (Select 2 answers) a.TASKKILL /IM CMD.EXE b.CMD.EXE /S c.TASKKILL CMD.EXE d. SHUTDOWN CMD.EXE e. EXIT

ANSWER

a.TASKKILL /IM CMD.EXE

QUESTION 39

Which of the following commands in Windows Command Prompt writes a new master boot record to a disk? a. BOOTREC /FIXBOOT b. FIXBOOT c. BOOTREC /FIXMBR d.FIXBOOT

ANSWER

c. BOOTREC /FIXMBR

QUESTION 40

A command-line utility in Microsoft Windows operating systems for registering and unregistering DLLs and ActiveX controls in the Windows Registry is called: a. MSCONFIG b.SFC c. REGSVR32 d.BOOTREC.EXE

ANSWER

c. REGSVR32

QUESTION 41

Which of the following answers lists a Windows command-line utility designed to be of help in troubleshooting NetBIOS name resolution problems? a. NBTSTAT b. NSLOOKUP c. NETSTAT d.TRACERT

ANSWER

a. NBTSTAT

QUESTION 42

Which of the following commands in Windows Command Prompt writes a new boot sector to the system partition? a. BOOTREC /FIXMBR b. FIXBOOT c. BOOTREC /FIXBOOT d. FIXMBR

ANSWER

c. BOOTREC /FIXBOOT

QUESTION 43

Which of the following commands allows for editing Windows registry from the Command Prompt? a. REGEDT32 b. REG c. CHKDSK d. REGEDIT

ANSWER

b. REG

QUESTION 44

The following Windows command-line command can be used to display a list of domains, computers, or shared resources available on a specific computer. a. NET VIEW b. REG c. NETSTAT d.VIEW

ANSWER

a. NET VIEW

QUESTION 45

Which of the Windows Command Prompt commands listed below can be used to delete one or more files? (Select all that apply) a.EDIT b.TASKKILL c. DEL d.ERASE e. MOVE

ANSWER

c. DEL d.ERASE

QUESTION 46

Which of the following answers lists the correct syntax for a Windows Command Prompt TASKKILL command that would allow to close NOTEPAD.EXE by providing its imagename? a.TASKKILL /IM NOTEPAD.EXE b.TASKKILL /PID NOTEPAD c.TASKKILL /IM NOTEPAD d.TASKKILL /PID NOTEPAD.EXE

ANSWER

a.TASKKILL /IM NOTEPAD.EXE

QUESTION 47

Which parameter of the RD command in Windows allows for the deletion of an entire directory tree? (the specified directory and all its subdirectories, including all files) a. /A b./S c. /Y d./Q

ANSWER

b./S

QUESTION 48

Which of the following wildcard characters can be used as a substitute for a single character in a file or directory name? a. ? b. $ c. * d. &

ANSWER

a. ?

QUESTION 49

Which of the wildcard characters listed below can be used as a substitute for any string of characters in a file or directory name? a.$ b.* c. & d.?

ANSWER

b.*

QUESTION 50

Which of the following Windows Command Prompt commands can be used to list all directory's files and subdirectories contained in the current directory? (Select 2 answers) a. DIR b./? c. DIR . d. . e, DIR /ALL

ANSWER

a. DIR c. DIR .

Looking for a different version?

CBTs get updated every year. Search for the exact version you're taking (e.g. "cyber awareness 2025").

Search all study materials