wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Comptia A+ 1102 "Command Line"

Total questions: 69

Worksheet time: 35mins

Name
Class
Date
1.

Which of the following is NOT one of the three command-line options provided by Microsoft?

a)

Command Prompt

b)

PowerShell

c)

Windows Terminal

d)

Linux Shell

2.

What is the primary function of the Command Prompt in Windows?

a)

To browse the internet

b)

To issue commands concerning files and directories, networking, services, and so on

c)

To edit photos

d)

To play music

3.

Which option is the quickest way to open Command Prompt in Windows 10?

a)

Type "cmd" in the Search tool

b)

Type "command" in the Search tool

c)

Type "prompt" in the Search tool

d)

Type "terminal" in the Search tool

4.

Which keyboard shortcut opens the Run prompt in Windows?

a)

Ctrl+R

b)

Alt+R

c)

Windows+R

d)

Shift+R

5.

What should you do to run the Command Prompt as an administrator from the Windows 10 Start menu?

a)

Click Start > Windows System, right-click Command Prompt, click More, and select Run as administrator

b)

Click Start > Windows System, right-click Command Prompt, and select Open

c)

Click Start > Windows System, right-click Command Prompt, and select Properties

d)

Click Start > Windows System, right-click Command Prompt, and select Rename

6.

In Windows 11, what does right-clicking on the Start button show as the default command-line tool?

a)

Command Prompt

b)

Terminal

c)

PowerShell

d)

Task Manager

7.

What is PowerShell a combination of?

a)

Command Prompt and a scripting language

b)

Task Manager and a scripting language

c)

Terminal and a scripting language

d)

Command Prompt and Task Manager

8.

Which of the following is NOT a way to open PowerShell?

a)

Open the Search tool and type powershell

b)

Go to the Run prompt and type powershell.exe

c)

Navigate to Start > Windows PowerShell > Windows PowerShell

d)

Press Ctrl+Alt+Delete and select PowerShell

9.

Windows 10 allows you to right-click the start menu to access PowerShell, what is another shortcut that allows users to access PowerShell?

a)

Ctrl+Shift+Esc

b)

Alt+F4

c)

Windows+X

d)

Ctrl+Alt+Delete

10.

In Windows 10, how can you change the option from Command Prompt to PowerShell?

a)

Settings > Personalization > Taskbar > Replace Command Prompt with PowerShell

b)

Settings > System > Taskbar > Replace Command Prompt with PowerShell

c)

Settings > Update & Security > Taskbar > Replace Command Prompt with PowerShell

d)

Settings > Devices > Taskbar > Replace Command Prompt with PowerShell

11.

How can you open PowerShell as an administrator?

a)

Open the Search tool, type powershell, right-click PowerShell, and select Run as administrator

b)

Go to the Run prompt, type powershell.exe, and press Enter

c)

Navigate to Start > Windows PowerShell > Windows PowerShell

d)

Press Ctrl+Alt+Delete and select PowerShell

12.

What is another name for running PowerShell as an administrator?

a)

Elevated mode

b)

Admin mode

c)

Superuser mode

d)

Root mode

13.

Which integrated development environment (IDE) is often used by administrators to write scripts?

a)

Visual Studio Code (VSCode)

b)

Eclipse

c)

NetBeans

d)

IntelliJ IDEA

14.

What is the default command-line tool that Windows Terminal starts with?

a)

PowerShell

b)

Command Prompt

c)

Bash

d)

Zsh

15.

Which feature of Windows Terminal allows running multiple sessions within the same program?

a)

Multi-tabbed

b)

Multi-threaded

c)

Multi-user

d)

Multi-tasking

16.

What can you run in Windows Terminal if you have the Windows Subsystem for Linux (WSL) installed?

a)

Various distributions of Linux

b)

macOS applications

c)

Android applications

d)

iOS applications

17.

What is the naming convention for accessing the help file associated with a particular command in the command line?

a)

[command name] /help

b)

[command name] /info

c)

[command name] /?

d)

[command name] /manual

18.

Which command can you use to get more information about the 'ping' command?

a)

ping /help

b)

ping /info

c)

ping /?

d)

ping /manual

19.

What is the best all-around way to access help for commands in the command line?

a)

help [command]

b)

[command] /help

c)

[command] /info

d)

[command] /?

20.

Which of the following is NOT a command-line tool mentioned in the text?

a)

Command Prompt

b)

PowerShell

c)

Windows Terminal

d)

Linux Shell

21.

According to the text, what is the original name for 'folder'?

a)

Directory

b)

File

c)

Container

d)

Archive

22.

What is one advantage of using the command line over the GUI, as mentioned in the text?

a)

It is more visually appealing.

b)

It is faster if you can type quickly.

c)

It has more features.

d)

It is easier to use.

23.

Which command is used to change the current directory in the command line?

a)

md

b)

rd

c)

cd

d)

ls

24.

What does the command 'md' do in the command line?

a)

Change directory

b)

Make directory

c)

Remove directory

d)

List directory contents

25.

Which command would you use to remove a directory in the command line?

a)

cd

b)

md

c)

rd

d)

ls

26.

What is the purpose of the '/S' switch when used with the 'rd' command?

a)

To change the directory

b)

To create a directory

c)

To remove directories that contain files

d)

To list the contents of a directory

27.

What is the older version of the 'md' command?

a)

mkdir

b)

mdir

c)

rmdir

d)

cd

28.

What is the older version of the 'rd' command?

a)

mkdir

b)

mdir

c)

rmdir

d)

cd

29.

Which command would you use to change the current position to the Pinball directory from C:\Office?

a)

cd c:\games\pinball

b)

md c:\games\pinball

c)

rd c:\games\pinball

d)

ls c:\games\pinball

30.

How would you create a directory called 'documents' within 'Word'?

a)

cd c:\office\word\documents

b)

md c:\office\word\documents

c)

rd c:\office\word\documents

d)

ls c:\office\word\documents

31.

What command would you use to delete the directory 'excel'?

a)

cd c:\office\excel

b)

md c:\office\excel

c)

rd c:\office\excel

d)

ls c:\office\excel

32.

Assume you have files within the 'pinball' directory and want to remove the directory. What command will you use?

a)

cd c:\games\pinball

b)

del c:\games\pinball

c)

rd c:\games\pinball

d)

rd /s c:\games\pinball

33.

What command is used to find out what volumes you have on your system in PowerShell?

a)

wmic logicaldisk get name

b)

dir

c)

cd

d)

md

34.

In the example provided, which two drives were identified by the command wmic logicaldisk get name?

a)

C: and D:

b)

C: and E:

c)

C: D: and E:

d)

D: and E:

35.

What does the PS indicate in the command prompt examples provided?

a)

You are working in PowerShell

b)

You are working in Command Prompt

c)

You are working in Linux Terminal

d)

You are working in a text editor

36.

Assume the directory "test1" is located at the root of the "F" drive. Which command would you use to change to the test1 directory in the F: drive from the C: drive?

a)

cd F:\test1

b)

md F:\test1

c)

rd F:\test1

d)

dir F:\test1

37.

What does the system remember for each drive that you access?

a)

The last directory you were working in

b)

The first directory you accessed

c)

The total storage capacity

d)

The available free space

38.

Which command is used to display the contents of the current directory in the command line?

a)

tree

b)

copy

c)

dir

d)

xcopy

39.

What does the command 'tree' do in the command line?

a)

Copies files from one location to another

b)

Displays all directories and subdirectories at your current position

c)

Deletes files from the directory

d)

Shows the contents of the current directory

40.

Which command would you use to copy a file named 'test.txt' from the office directory to the excel directory?

a)

copy \office\test.txt \excel\

b)

xcopy \office\test.txt \excel\

c)

robocopy \office\test.txt \excel\

d)

del \office\test.txt \excel\

41.

What is the purpose of the 'xcopy' command?

a)

To delete files from a directory

b)

To display the contents of the current directory

c)

To copy large amounts of data from one location to another

d)

To show all directories and subdirectories at your current position

42.

Which command is described as a directory replication tool that can mirror complete directory trees from one computer to another?

a)

copy

b)

xcopy

c)

robocopy

d)

del

43.

What is one of the advantages of using the xcopy tool?

a)

It copies individual files.

b)

It makes exact copies of entire directory trees,.

c)

It deletes files automatically.

d)

It only works with text files.

44.

What does robocopy do differently compared to xcopy?

a)

It copies individual files.

b)

It can tolerate network interruptions, skip past junctions, and preserve data attributes and timestamps.

c)

It deletes files once the copy completes.

d)

It only works when users are logged on to a system and therefore requires authenticated user accounts.

45.

Which command would you use to delete a file named test.txt in the \office\excel directory?

a)

xcopy \office\excel\test.txt

b)

robocopy \office\excel\test.txt

c)

del \office\excel\test.txt

d)

copy \office\excel\test.txt

46.

What is the default graphical text editor in Windows?

a)

Notepad++

b)

Sublime Text

c)

Notepad

d)

Vim

47.

Which command-line utility is the counterpart of the Windows Disk Management program?

a)

xcopy

b)

robocopy

c)

diskpart

d)

del

48.

Which command is used to format storage media to a particular file system such as NTFS, FAT, or FAT32?

a)

chkdsk

b)

sfc

c)

format

d)

defrag

49.

What command is the command-line version of Disk Defragmenter?

a)

chkdsk

b)

sfc

c)

format

d)

defrag

50.

Which command checks a drive, fixes basic issues like lost files, and displays a status report?

a)

chkdsk

b)

sfc

c)

format

d)

defrag

51.

What does the /F switch do when used with the chkdsk command?

(e.g. "chkdsk /F")

a)

Formats the drive

b)

Fixes errors on the drive

c)

Locates bad sectors and recovers data

d)

Defragments the drive

52.

What is the purpose of the sfc command?

a)

To format storage media

b)

To defragment a drive

c)

To analyze and repair system files

d)

To check and fix errors on a drive

53.

What does the "Missing Operating System" message usually indicate?

a)

The drive needs to be formatted

b)

The drive has a few small errors

c)

The system files are corrupted

d)

The drive needs to be defragmented

54.

Which switch with the chkdsk command locates bad sectors and recovers data?

a)

/F

b)

/R

c)

/A

d)

/D

55.

What is the primary function of the System File Checker (SFC) utility in Windows?

a)

To check and repair hard disk errors

b)

To check and repair protected system files

c)

To defragment the hard drive

d)

To update Windows drivers

56.

Which command would you use to scan and repair all protected system files immediately?

a)

sfc /verifyonly

b)

sfc /scannow

c)

chkdsk /F

d)

winver

57.

Where does SFC write the details of each repair it performs?

a)

%systemroot%\Logs\CBS.log

b)

C:\Windows\System32\log.txt

c)

%systemroot%\System32\repair.log

d)

C:\Windows\Logs\SFC.log

58.

What does the sfc /verifyonly command do?

a)

Scans and repairs protected system files

b)

Scans the integrity of files but does not perform a repair

c)

Checks and repairs hard disk errors

d)

Displays the Windows version and build number

59.

What is the default folder for %systemroot% in Windows?

a)

C:\Program Files

b)

C:\Windows

c)

C:\Windows\System32

d)

C:\Windows\System

60.

What does the winver command do?

a)

Checks and repairs protected system files

b)

Displays the Windows version, edition, and build number

c)

Scans and repairs hard disk errors

d)

Defragments the hard drive

61.

What version of Windows 11 is shown in the figure?

a)

Version 23H2

b)

Version 21H1

c)

Version 20H2

d)

Version 20H1

62.

What is the build number of Windows 10 Pro version 21H1 shown in the figure?

a)

19041.1288

b)

22638.3180

c)

22631.3880

d)

19044.1288

63.

Which command can be used in the "Command Prompt" to see the Windows version?

(select the two best answers)

a)

winverwinver

b)

verver

c)

$psversiontable

d)

AlloftheaboveAll of the above

64.

What is the primary use of the shutdown command?

a)

To update system policies

b)

To turn off a computer

c)

To display system information

d)

To install software

65.

Which command would you use for an immediate shutdown?

a)

shutdown /s

b)

shutdown /r

c)

shutdown /p

d)

shutdown /h

66.

What does the gpupdate command do?

a)

Displays the Resultant Set of Policy (RSoP) information

b)

Updates all policies that have been modified on the target computer

c)

Shuts down the computer

d)

Logs off the user

67.

Which command displays the Resultant Set of Policy (RSoP) information for a user and computer?

a)

gpupdate

b)

gpresult

c)

shutdown

d)

secpol

68.

What is the purpose of the /S switch in the gpresult command?

a)

To specify the target system's name

b)

To save the reported information in XML format

c)

To update system policies

d)

To restart the computer

69.

What is the purpose of /R when running a gpresult command?

(e.g. "gpresult /r")

a)

To get the computer name

b)

To get basic information about the local computer, the user, and the policies that are running.

c)

To force the application of policies

d)

To remote on to a machine on your domain.