Timedora
Free Practice Quiz Question List

Command-Line Shell Basics Online Quiz Questions

Use this free practice quiz with 20 questions to review Command-Line Shell Basics, test your knowledge, and prepare for your next test or exam.

20 questions
01
Choose one
1 point

What role does a shell play after you enter a command at the command prompt?

  1. A

    It only displays a prompt; the user must interpret and run every command.

  2. B

    It reads and interprets input, runs commands, displays results, and returns to a prompt when ready.

  3. C

    It stores commands without displaying their results.

  4. D

    It determines the user's permissions based solely on the prompt symbol.

02
Choose all
1 point

Which are listed as possible ways to request command help in a Unix-like shell? Select all that apply.

  1. A

    command --help

  2. B

    command -h

  3. C

    man command

  4. D

    command [OPTION], where the brackets are typed literally

  5. E

    help command in every shell and program

03
True or false
1 point

True or false: In the command ls -l reports, reports is the option and -l is the argument.

  1. A

    True

  2. B

    False

04
Written response
1 point

Before acting on a target, which command can you run to check your current working directory?

05
Fill in the blank
1 point

Many commands use exit status to conventionally indicate success; a status indicates a problem or another condition.

06
Open ended
1 point

A command finishes without displaying anything. How can you assess whether it succeeded rather than assuming that silence means failure? Include the Bash method for checking the previous command's status.

07
Choose one
1 point

A shell prompt appears, indicating that the shell is ready. What should you do next?

  1. A

    Include the prompt symbol as the first character of every command.

  2. B

    Wait for the prompt to disappear before entering a command.

  3. C

    Type the command after the prompt and press Enter; do not treat the prompt as part of the command.

  4. D

    Use the prompt symbol alone to determine whether you have root permissions.

08
Choose all
1 point

Which actions are part of a careful command-line workflow? Select all that apply.

  1. A

    Check your location with pwd and inspect the target with ls.

  2. B

    Read the command's help if its behavior or options are unfamiliar.

  3. C

    Identify the command, its options, and each argument before pressing Enter.

  4. D

    Quote paths containing spaces and check potentially destructive commands carefully.

  5. E

    Read the output or error and verify whether the intended result occurred.

  6. F

    Assume that a command succeeded whenever it prints no error.

09
True or false
1 point

True or false: If command help shows an optional item as [OPTION], you should usually type the square brackets as part of the command.

  1. A

    True

  2. B

    False

10
Written response
1 point

In ls -l reports, which exact option requests a long-format listing?

11
Fill in the blank
1 point

Many commands return an . A value of conventionally indicates success.

12
Choose one
1 point

A help page shows the syntax [OPTION]. What do the square brackets usually indicate?

  1. A

    The brackets mean the item must always be typed exactly as shown.

  2. B

    The brackets usually mark an optional item and are not typed.

  3. C

    The brackets mean the item is a filename that must be replaced.

  4. D

    The brackets indicate that the command will display an error.

13
True or false
1 point

In a Unix-like shell, ls "project notes" normally passes project notes as one argument.

  1. A

    True

  2. B

    False

14
Written response
1 point

Before acting on a target, which Unix-like shell command from the careful workflow prints your current working directory?

15
Choose one
1 point

What does a shell do when you enter a command?

  1. A

    It only displays a readiness symbol and never processes commands.

  2. B

    It translates every command into a graphical menu.

  3. C

    It reads and interprets input, runs commands, and displays results.

  4. D

    It guarantees that every command works the same way in every operating system.

16
True or false
1 point

True or false: In a command such as ls -l reports, -l is the argument that identifies the directory, while reports is the option that modifies the listing.

  1. A

    True

  2. B

    False

17
Written response
1 point

In the careful workflow, which Unix-like shell command is used to inspect a target?

18
Choose one
1 point

Which help system does PowerShell provide for commands?

  1. A

    man command

  2. B

    help command

  3. C

    command -h

  4. D

    Get-Help

19
Written response
1 point

What exit-status number conventionally indicates that a command succeeded?

20
Choose one
1 point

What does a command-line prompt indicate, and should you include the prompt itself when typing a command?

  1. A

    It signals that the shell is ready for input; it is not part of the command.

  2. B

    It is always the first character of the command and must be included.

  3. C

    It proves that the user has administrator permissions.

  4. D

    It displays the results of the previous command.