nerdexam
Linux_Foundation

LFCS · Question #803

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 command in Bash is used to manipulate shell options and positional parameters for the current shell session.

Submitted by yousef_jo· Apr 18, 2026Essential 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

(52 responses)
  • B
    90% (47)
  • C
    2% (1)
  • D
    4% (2)
  • E
    4% (2)

Why each option

The `set` command in Bash is used to manipulate shell options and positional parameters for the current shell session.

Ahistory

`history` is used to display or manipulate the command history list, not shell options or parameters.

BsetCorrect

The `set` command is a Bash built-in that allows users to modify shell options, such as `set -o noclobber` to prevent overwriting files, and to assign or display positional parameters like `$1`, `$2`, etc. These changes directly affect the behavior of the currently running Bash shell.

Cbashconf

`bashconf` is not a standard Bash command for configuring a running shell.

Dsetsh

`setsh` is not a standard Bash command for altering shell settings.

Eenvsetup

`envsetup` is not a standard Bash command used to change shell options or parameters.

Concept tested: Bash shell options and positional parameters

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

Topics

#Bash shell#set command#shell options#positional parameters

Community Discussion

No community discussion yet for this question.

Full LFCS Practice