nerdexam
Oracle

1Z0-821 · Question #149

You have edited /etc/profile to include the lines: dennis_says=hello export dennie_says You have also edited /etc/skel/local.profile to include the line: dennis_says=world You now create a new user…

The correct answer is C. hello, because the local.profile entry is not automatically sourced on login. See the full explanation below for the reasoning.

Question

You have edited /etc/profile to include the lines:

dennis_says=hello export dennie_says You have also edited /etc/skel/local.profile to include the line:

dennis_says=world You now create a new user account brian, and specify use of the bash shell. When brian logs in and enters echo $dennis_says What will he see, and why?

Options

  • Aworld, because the local.profile entry will be executed last
  • Bhello, because the global /etc/profile entry overrides the local.profile entry
  • Chello, because the local.profile entry is not automatically sourced on login
  • Dhello, because the value specified in local.profile was not exported
  • Enothing, because the variable was not exported in local.profile

How the community answered

(43 responses)
  • B
    9% (4)
  • C
    84% (36)
  • D
    5% (2)
  • E
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-821 Practice