Font size
WorksheetsComptia A+ 1102 "Command Line"
Total questions: 69
Worksheet time: 35mins
Which of the following is NOT one of the three command-line options provided by Microsoft?
Command Prompt
PowerShell
Windows Terminal
Linux Shell
What is the primary function of the Command Prompt in Windows?
To browse the internet
To issue commands concerning files and directories, networking, services, and so on
To edit photos
To play music
Which option is the quickest way to open Command Prompt in Windows 10?
Type "cmd" in the Search tool
Type "command" in the Search tool
Type "prompt" in the Search tool
Type "terminal" in the Search tool
Which keyboard shortcut opens the Run prompt in Windows?
Ctrl+R
Alt+R
Windows+R
Shift+R
What should you do to run the Command Prompt as an administrator from the Windows 10 Start menu?
Click Start > Windows System, right-click Command Prompt, click More, and select Run as administrator
Click Start > Windows System, right-click Command Prompt, and select Open
Click Start > Windows System, right-click Command Prompt, and select Properties
Click Start > Windows System, right-click Command Prompt, and select Rename
In Windows 11, what does right-clicking on the Start button show as the default command-line tool?
Command Prompt
Terminal
PowerShell
Task Manager
What is PowerShell a combination of?
Command Prompt and a scripting language
Task Manager and a scripting language
Terminal and a scripting language
Command Prompt and Task Manager
Which of the following is NOT a way to open PowerShell?
Open the Search tool and type powershell
Go to the Run prompt and type powershell.exe
Navigate to Start > Windows PowerShell > Windows PowerShell
Press Ctrl+Alt+Delete and select PowerShell
Windows 10 allows you to right-click the start menu to access PowerShell, what is another shortcut that allows users to access PowerShell?
Ctrl+Shift+Esc
Alt+F4
Windows+X
Ctrl+Alt+Delete
In Windows 10, how can you change the option from Command Prompt to PowerShell?
Settings > Personalization > Taskbar > Replace Command Prompt with PowerShell
Settings > System > Taskbar > Replace Command Prompt with PowerShell
Settings > Update & Security > Taskbar > Replace Command Prompt with PowerShell
Settings > Devices > Taskbar > Replace Command Prompt with PowerShell
How can you open PowerShell as an administrator?
Open the Search tool, type powershell, right-click PowerShell, and select Run as administrator
Go to the Run prompt, type powershell.exe, and press Enter
Navigate to Start > Windows PowerShell > Windows PowerShell
Press Ctrl+Alt+Delete and select PowerShell
What is another name for running PowerShell as an administrator?
Elevated mode
Admin mode
Superuser mode
Root mode
Which integrated development environment (IDE) is often used by administrators to write scripts?
Visual Studio Code (VSCode)
Eclipse
NetBeans
IntelliJ IDEA
What is the default command-line tool that Windows Terminal starts with?
PowerShell
Command Prompt
Bash
Zsh
Which feature of Windows Terminal allows running multiple sessions within the same program?
Multi-tabbed
Multi-threaded
Multi-user
Multi-tasking
What can you run in Windows Terminal if you have the Windows Subsystem for Linux (WSL) installed?
Various distributions of Linux
macOS applications
Android applications
iOS applications
What is the naming convention for accessing the help file associated with a particular command in the command line?
[command name] /help
[command name] /info
[command name] /?
[command name] /manual
Which command can you use to get more information about the 'ping' command?
ping /help
ping /info
ping /?
ping /manual
What is the best all-around way to access help for commands in the command line?
help [command]
[command] /help
[command] /info
[command] /?
Which of the following is NOT a command-line tool mentioned in the text?
Command Prompt
PowerShell
Windows Terminal
Linux Shell
According to the text, what is the original name for 'folder'?
Directory
File
Container
Archive
What is one advantage of using the command line over the GUI, as mentioned in the text?
It is more visually appealing.
It is faster if you can type quickly.
It has more features.
It is easier to use.
Which command is used to change the current directory in the command line?
md
rd
cd
ls
What does the command 'md' do in the command line?
Change directory
Make directory
Remove directory
List directory contents
Which command would you use to remove a directory in the command line?
cd
md
rd
ls
What is the purpose of the '/S' switch when used with the 'rd' command?
To change the directory
To create a directory
To remove directories that contain files
To list the contents of a directory
What is the older version of the 'md' command?
mkdir
mdir
rmdir
cd
What is the older version of the 'rd' command?
mkdir
mdir
rmdir
cd
Which command would you use to change the current position to the Pinball directory from C:\Office?
cd c:\games\pinball
md c:\games\pinball
rd c:\games\pinball
ls c:\games\pinball
How would you create a directory called 'documents' within 'Word'?
cd c:\office\word\documents
md c:\office\word\documents
rd c:\office\word\documents
ls c:\office\word\documents
What command would you use to delete the directory 'excel'?
cd c:\office\excel
md c:\office\excel
rd c:\office\excel
ls c:\office\excel
Assume you have files within the 'pinball' directory and want to remove the directory. What command will you use?
cd c:\games\pinball
del c:\games\pinball
rd c:\games\pinball
rd /s c:\games\pinball
What command is used to find out what volumes you have on your system in PowerShell?
wmic logicaldisk get name
dir
cd
md
In the example provided, which two drives were identified by the command wmic logicaldisk get name?
C: and D:
C: and E:
C: D: and E:
D: and E:
What does the PS indicate in the command prompt examples provided?
You are working in PowerShell
You are working in Command Prompt
You are working in Linux Terminal
You are working in a text editor
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?
cd F:\test1
md F:\test1
rd F:\test1
dir F:\test1
What does the system remember for each drive that you access?
The last directory you were working in
The first directory you accessed
The total storage capacity
The available free space
Which command is used to display the contents of the current directory in the command line?
tree
copy
dir
xcopy
What does the command 'tree' do in the command line?
Copies files from one location to another
Displays all directories and subdirectories at your current position
Deletes files from the directory
Shows the contents of the current directory
Which command would you use to copy a file named 'test.txt' from the office directory to the excel directory?
copy \office\test.txt \excel\
xcopy \office\test.txt \excel\
robocopy \office\test.txt \excel\
del \office\test.txt \excel\
What is the purpose of the 'xcopy' command?
To delete files from a directory
To display the contents of the current directory
To copy large amounts of data from one location to another
To show all directories and subdirectories at your current position
Which command is described as a directory replication tool that can mirror complete directory trees from one computer to another?
copy
xcopy
robocopy
del
What is one of the advantages of using the xcopy tool?
It copies individual files.
It makes exact copies of entire directory trees,.
It deletes files automatically.
It only works with text files.
What does robocopy do differently compared to xcopy?
It copies individual files.
It can tolerate network interruptions, skip past junctions, and preserve data attributes and timestamps.
It deletes files once the copy completes.
It only works when users are logged on to a system and therefore requires authenticated user accounts.
Which command would you use to delete a file named test.txt in the \office\excel directory?
xcopy \office\excel\test.txt
robocopy \office\excel\test.txt
del \office\excel\test.txt
copy \office\excel\test.txt
What is the default graphical text editor in Windows?
Notepad++
Sublime Text
Notepad
Vim
Which command-line utility is the counterpart of the Windows Disk Management program?
xcopy
robocopy
diskpart
del
Which command is used to format storage media to a particular file system such as NTFS, FAT, or FAT32?
chkdsk
sfc
format
defrag
What command is the command-line version of Disk Defragmenter?
chkdsk
sfc
format
defrag
Which command checks a drive, fixes basic issues like lost files, and displays a status report?
chkdsk
sfc
format
defrag
What does the /F switch do when used with the chkdsk command?
(e.g. "chkdsk /F")
Formats the drive
Fixes errors on the drive
Locates bad sectors and recovers data
Defragments the drive
What is the purpose of the sfc command?
To format storage media
To defragment a drive
To analyze and repair system files
To check and fix errors on a drive
What does the "Missing Operating System" message usually indicate?
The drive needs to be formatted
The drive has a few small errors
The system files are corrupted
The drive needs to be defragmented
Which switch with the chkdsk command locates bad sectors and recovers data?
/F
/R
/A
/D
What is the primary function of the System File Checker (SFC) utility in Windows?
To check and repair hard disk errors
To check and repair protected system files
To defragment the hard drive
To update Windows drivers
Which command would you use to scan and repair all protected system files immediately?
sfc /verifyonly
sfc /scannow
chkdsk /F
winver
Where does SFC write the details of each repair it performs?
%systemroot%\Logs\CBS.log
C:\Windows\System32\log.txt
%systemroot%\System32\repair.log
C:\Windows\Logs\SFC.log
What does the sfc /verifyonly command do?
Scans and repairs protected system files
Scans the integrity of files but does not perform a repair
Checks and repairs hard disk errors
Displays the Windows version and build number
What is the default folder for %systemroot% in Windows?
C:\Program Files
C:\Windows
C:\Windows\System32
C:\Windows\System
What does the winver command do?
Checks and repairs protected system files
Displays the Windows version, edition, and build number
Scans and repairs hard disk errors
Defragments the hard drive
What version of Windows 11 is shown in the figure?
Version 23H2
Version 21H1
Version 20H2
Version 20H1
What is the build number of Windows 10 Pro version 21H1 shown in the figure?
19041.1288
22638.3180
22631.3880
19044.1288
Which command can be used in the "Command Prompt" to see the Windows version?
(select the two best answers)
winver
ver
$psversiontable
Alloftheabove
What is the primary use of the shutdown command?
To update system policies
To turn off a computer
To display system information
To install software
Which command would you use for an immediate shutdown?
shutdown /s
shutdown /r
shutdown /p
shutdown /h
What does the gpupdate command do?
Displays the Resultant Set of Policy (RSoP) information
Updates all policies that have been modified on the target computer
Shuts down the computer
Logs off the user
Which command displays the Resultant Set of Policy (RSoP) information for a user and computer?
gpupdate
gpresult
shutdown
secpol
What is the purpose of the /S switch in the gpresult command?
To specify the target system's name
To save the reported information in XML format
To update system policies
To restart the computer
What is the purpose of /R when running a gpresult command?
(e.g. "gpresult /r")
To get the computer name
To get basic information about the local computer, the user, and the policies that are running.
To force the application of policies
To remote on to a machine on your domain.
