nerdexam
CompTIA

LX0-103 · Question #203

Which of the following commands is used to change options and positional parameters for a running Bash?

The correct answer is B. set. The 'set' builtin is the standard Bash command for modifying shell options and positional parameters in a running shell session.

GNU and Unix Commands

Question

Which of the following commands is used to change options and positional parameters for a running Bash?

Options

  • Ahistory
  • Bset
  • Cbashconf
  • Dsetsh
  • Eenvsetup

How the community answered

(21 responses)
  • B
    90% (19)
  • C
    5% (1)
  • E
    5% (1)

Why each option

The 'set' builtin is the standard Bash command for modifying shell options and positional parameters in a running shell session.

Ahistory

'history' displays or manipulates the command history list and has no ability to change shell options or positional parameters.

BsetCorrect

The 'set' builtin command is used in Bash to enable or disable shell options (e.g., 'set -e', 'set -x') and to assign positional parameters. It directly controls the behavior of the currently running Bash instance without requiring an external utility.

Cbashconf

'bashconf' is not a real Bash builtin or standard Linux command.

Dsetsh

'setsh' is not a real Bash builtin or standard Linux command.

Eenvsetup

'envsetup' is not a standard Bash builtin; it is sometimes a project-specific script in certain SDKs but has no role in changing Bash options.

Concept tested: Bash set builtin for shell options and parameters

Source: https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin

Topics

#bash#set command#shell options#positional parameters

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice