nerdexam
LPI

117-201 · Question #121

When bash is invoked as an interactive login shell, which of the following sentences is true?

The correct answer is A. It first reads and executes commands in /etc/bashrc and then does the same for /etc/profile. See the full explanation below for the reasoning.

Question

When bash is invoked as an interactive login shell, which of the following sentences is true?

Options

  • AIt first reads and executes commands in /etc/bashrc and then does the same for /etc/profile.
  • BIt ignores /etc/profile and only reads and executes commands in ~/.bashrc.
  • CIt first reads and executes commands in /etc/profile and then does the same for
  • DIt first reads and executes commands in /etc/profile and then does same for ~/.bash_profile
  • EIt reads and executes commands in ~/.bashrc only if /etc/profile or another initialisation script

How the community answered

(52 responses)
  • A
    71% (37)
  • B
    6% (3)
  • C
    2% (1)
  • D
    4% (2)
  • E
    17% (9)

Community Discussion

No community discussion yet for this question.

Full 117-201 Practice