Microsoft Command-Line Tools Quiz Flashcards

(42 cards)

1
Q

Which of the answers listed below refer to Windows command-line commands used for directory traversal? (Select 2 answers)

  1. cd
  2. pwd
  3. dir
  4. chdir
  5. path
A

cd

cd = Change Directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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 all that apply)

dir
dir /?
dir *.*
dir /all
dir /list
A
dir
dir *.*

dir = Display files and folders in current DIRectory.
The asterix is a wildcard, meaning it can represent anything.
~~~

.
~~~
means “any file name”.”any file extension”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the answers listed below refer to Windows command-line commands used to create a directory or subdirectory? (Select 2 answers)

  1. md
  2. mkd
  3. mdir
  4. mkdr
  5. mkdir
A

md
mkdir

md = Make a Directory

mkdir = MaKe a DIRectory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following Windows Command Prompt commands can be used to delete a directory? (Select all that apply)

  1. rd
  2. del
  3. rmdir
  4. dir /d
  5. popd
A

rd
rmdir

rd = Remove Directory

rmdir = ReMove DIRectory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the Windows command-line commands listed below changes the drive from C: to D:?

C:\>D:
C:\>[D:]
C:\>D:\
C:\>cd D:\
A
C:\>D:

There’s two parts, the prompt and the command.

C:\> — This is the prompt. You don't type this. It tells you three things:
    C: — You are currently on the C: drive.
    \ — You are in the root directory of the C: drive.
    > — This is the command-line prompt symbol, which tells you the shell is ready to accept input.

D: — This is the actual command you type. It means:
    D: — You want to switch to the D: drive.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following command-line commands displays the name of the current computer a user is connected to?

  1. host
  2. hosts
  3. hostname
  4. localhost
A

hostname

hostname = Display the NAME of the computer (aka the HOST)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Netstat is a command-line utility used for: (Select 2 answers)

  1. Displaying active TCP/IP connections
  2. Testing the reachability of a remote host
  3. Displaying intermediary points on the packet route
  4. Viewing the TCP/IP configuration details
  5. Displaying network protocol statistics
A

Displaying
Active TCP/IP connections
and
Network protocol statistics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the network command-line tools listed below enables obtaining an FQDN-to-IP address mapping?

  1. netstat
  2. nslookup
  3. tracert
  4. pathping
A

nslookup

FQDN = Fully Qualified Domain Name (for example: www.Google.com)

nslookup = Name Server LOOKUP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which command-line command in Windows lists a computer’s connections to shared resources?

  1. net share
  2. net use
  3. net session
  4. net config
A

net use

net use = The NETwork resources you’re USE-ing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which Command Prompt command in MS Windows lists the user accounts for the computer?

  1. net view
  2. net session
  3. net user
  4. net accounts
A

net user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A network command-line utility in MS Windows that tracks and displays the route taken by IP packets on their way to another host is known as:

  1. ping
  2. traceroute
  3. nslookup
  4. tracert
A

tracert

tracert = TRACE the RouTe of packets traveling over the network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

For a newly added storage drive, this command-line command allows you to configure it with a file system, enabling Windows to store information on the drive.

  1. gpart
  2. sfdisk
  3. mount
  4. format
A

format

gpart and sfdisk are Unix, not Windows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following Command Prompt commands in MS Windows can be used to copy one or more files from one location to another?

  1. copy
  2. move
  3. cp
  4. pushd
A

copy

move is more like cut than copy.
cp is Unix, not Windows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which Microsoft Windows command-line command(s) allow(s) for copying multiple files and directories, including subdirectories? (Select all that apply)

  1. cp
  2. xcopy
  3. move
  4. robocopy
  5. copy
A

xcopy
robocopy

xcopy = eXtended COPY
robocopy = ROBust COPY

cp is Unix, not Windows.
move is more like cut than copy.
copy only copies files, not directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which copying utility accessible via Windows command line interface offers the widest range of options?

  1. xcopy
  2. move
  3. robocopy
  4. copy
  5. cp
A

robocopy

robocopy = ROBust COPY

robocopy > xcopy > copy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of the Command Prompt commands listed below allows for updating multiple Group Policy settings in MS Windows?

  1. net user
  2. gpupdate
  3. bcdedit
  4. gpresult
A

gpupdate

gpupdate = Group Policy UPDATE

bcdedit is for managing Boot Configuration Data (BCD) files
gpresult displays current applied group policies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

A command-line tool in Windows that displays Group Policy information for a machine or user is called:

  1. gpresult
  2. net view
  3. verify
  4. gpupdate
A

gpresult

gpresult displays current applied Group Policies

verify verifies whether your files are written correctly to a disk.
gpupdate updates group policies.

18
Q

The following command can be used to shut down or restart a local or remote host running MS Windows.

  1. poweroff
  2. exit
  3. bootcfg
  4. shutdown
A

shutdown

poweroff is Unix, not Windows.
exit only exits the command line.
bootcfg configures Boot.ini settings.

19
Q

The sfc Command Prompt utility in MS Windows:

  1. Encrypts files and folders
  2. Scans the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions
  3. Displays information about system hardware and software configuration
  4. Checks a disk and displays a status report
A

Scans the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions

sfc = System File Checker

20
Q

Which command-line commands in Windows can be used to display help information related to a specific utility? (Select 2 answers)

  1. [command name] help
  2. man [command name]
  3. [command name] info
  4. help [command name]
  5. [command name] /?
A

help [command name]
[command name] /?

help has to come first.
man is Unix, not Windows.
info doesn’t exist.

21
Q

Which of the Command Prompt commands in MS Windows launches a text-based, command-line partitioning utility?

  1. sfdisk
  2. diskutil
  3. gpart
  4. diskpart
A

diskpart

diskpart = Display and adjusts DISK PARTition properties

sfdisk and gpart are Unix, not Windows.
diskutil is MacOS, not Windows.

22
Q

Which network command-line utility in Windows combines the features of ping and tracert?

  1. pathping
  2. netcfg
  3. dig
  4. rpcping
A

pathping

netcfg installs the Windows Preinstallation Environment (WinPE), a lightweight version of Windows used to deploy workstations.
dig is Unix and MacOS, not Windows.
rpcping confirms the RPC connectivity for Microsoft Exchange.

23
Q

Which of the Command Prompt commands in MS Windows launches a pop-up window containing a brief summary of the installed operating system?

  1. winver
  2. msinfo32
  3. systeminfo
  4. msconfig
A

winver

winver = Display the VERsion of WINdows that is running

msinfo32 displays a comprehensive view of the hardware, system components, and software environment on the local computer.
systeminfo displays detailed configuration information about a computer and its operating system.
msconfig is a system utility to troubleshoot the Microsoft Windows startup process.

24
Q

Which Command Prompt commands in MS Windows move the command-line prompt one folder up in the directory tree (set the prompt at the parent folder of the current folder)? (Select 2 answers)

cd \
cd /^
cd ..
chdir \
chdir /^
chdir .. 
A
cd ..
chdir ..

cd = Change Directory

double period .. goes to parent directory.
backslash \ goes to root directory.
^ = Escape special characters (example: echo 5 ^> 3 → 5 > 3)

25
Which of the Windows command-line commands listed below change the current directory to the root directory? (Select 2 answers) ## Footnote cd .. cd /r cd \ chdir .. chdir /r chdir \
cd \ chdir \ | cd = **C**hange **D**irectory ## Footnote backslash \ goes to root directory. double period .. goes to parent directory. /r does nothing in this instance.
26
Which of the following answers refers to an ipconfig parameter used for displaying the full TCP/IP configuration information for all adapters? ## Footnote -a /? /all /-a
**/all** ## Footnote /? is the help menu. ipconfig -a and ipconfig /-a do nothing.
27
Which of the Command Prompt commands listed below are used for resetting the DHCP configuration settings for all adapters in MS Windows? (Select 2 answers) ## Footnote 1. ipconfig /disable 1. ifconfig eth0 down 1. ipconfig /release 1. ipconfig /enable 1. ifconfig eth0 up 1. ipconfig /renew
ipconfig /release ipconfig /renew ## Footnote ifconfig is Unix, not Windows. /enable and /disable are not used with ipconfig.
28
Which netstat parameter allows to display all active TCP connections and the TCP/UDP ports on which the computer is listening? ## Footnote -a -p -e -r
**-a** ## Footnote netstat -p does nothing without specifying the protocol (netstat -p tcp). netstat -e displays ethernet statistics. netstat -r displays the contents of the IP routing table.
29
# **True or False?** The -b netstat parameter in Microsoft Windows allows to display the name of an application involved in creating each connection or listening port.
**True** ## Footnote Displays the **B**inary (executable) program's name involved in creating each connection or listening port.
30
Which of the following netstat parameters displays addresses and port numbers in numerical form? ## Footnote -b -n -q -r
**-n** ## Footnote netstat -b displays the binary program's name involved in creating each connection or listening port. netstat -q does nothing. netstat -r displays the contents of the IP routing table.
31
Which of the command-line tools listed below can be used for troubleshooting DNS-related problems? ## Footnote arp nslookup tracert pathping
**nslookup** | Sends a DNS query to a specific IP or host name on the DNS server. ## Footnote nslookup = **N**ame **S**erver **LOOKUP** arp displays and edits entries in the Address Resolution Protocol (ARP) cache. ARP translates IP addresses into MAC addresses, not domain names. tracert and pathping are concerned with how data gets to its destination.
32
The /f switch of the chkdsk Command Prompt utility in MS Windows: ## Footnote 1. Locates bad sectors and recovers readable information 1. Fixes errors on the disk 1. Displays cleanup messages 1. Displays the full path and name of every file on the disk
**Fixes errors on the disk**
33
The /r switch of the chkdsk command-line utility in Windows: (Select 2 answers) ## Footnote 1. Displays cleanup messages 1. Locates bad sectors and recovers readable information 1. Uses more system resource to perform a scan as fast as possible 1. Displays the full path and name of every file on the disk 1. Fixes errors on the disk
**Locates bad sectors and recovers readable information** **Fixes errors on the disk**
34
Which copy command switch in Windows verifies that the new files are written correctly? ## Footnote /-y /v /y /a
**/v** ## Footnote /v **V**erifies that new files are written correctly. /a Indicates an **A**SCII text file. /y Suppresses prompting to confirm that you want to overwrite an existing destination file. /-y Prompts you to confirm that you want to overwrite an existing destination file.
35
Which of the copy command switches suppresses the confirmation prompt displayed when Windows is about to overwrite the contents of an existing file? ## Footnote /v /y /a /-y
**/y** ## Footnote /y Suppresses prompting to confirm that you want to overwrite an existing destination file. /-y Prompts you to confirm that you want to overwrite an existing destination file. /v **V**erifies that new files are written correctly. /a Indicates an **A**SCII text file.
36
Which of the following is the correct command for setting the time-out period of 30 seconds before powering off a Windows host? ## Footnote shutdown /r /t 30 shutdown /s /30 shutdown /s /t 30 shutdown /r /30
**shutdown /s /t 30** ## Footnote /s is for **S**hutdown and /r is for **R**estart. /t (X) Sets the **T**ime-out period before shutdown to X seconds.
37
Which shutdown command switch forces full system shutdown and restart of a Windows host? ## Footnote -s -r /r /s r -i
**/r** ## Footnote /r is for **R**estart and /s is for **S**hutdown. shutdown doesn't use dashes - in its switches.
38
Which of the command-line commands listed below enables a full system shutdown and restart of an MS Windows host after a time-out period of two minutes? ## Footnote shutdown /s /120 shutdown /r /t 120 shutdown /r /120 shutdown /s /t 120
**shutdown /r /t 120** ## Footnote /r is for **R**estart and /s is for **S**hutdown. /t (X) Sets the **T**ime-out period before shutdown to X seconds.
39
Which shutdown command switch enables aborting a system shutdown? ## Footnote /a /q /e /p
**/a** ## Footnote /a **A**borts a system shutdown. There is no /q /e **E**nables you to document the reason for an unexpected shutdown. If your computer doesn't support **P**ower-off functionality, it shuts down when you use /p, but the power to the computer remains on.
40
Which sfc switch enables a file check that scans integrity of all protected system files and attempts to repair corrupted files? ## Footnote /scannow /verifyonly /scanfile /verifyfile
**/scannow** ## Footnote /verifyonly scans the integrity of all protected system files, without performing repairs. /scanfile and /verifyfile do the same as /scannow and /verifyonly except only to the files you specify.
41
# **True or False?** Used without any parameters, the help command in MS Windows displays a list of available system commands along with a brief description of each command.
**True**
42
# **True or False?** The "Run as administrator" option in MS Windows available after right-clicking on the Command Prompt application icon enables execution of shell commands reserved for system administrator.
**True**