exam questions

Exam 102-500 All Questions

View all questions & answers for the 102-500 exam

Exam 102-500 topic 1 question 76 discussion

Actual exam question from LPI's 102-500
Question #: 76
Topic #: 1
[All 102-500 Questions]

Which of the following files is not read directly by a Bash login shell?

  • A. ~/.bashrc
  • B. ~/.bash_profile
  • C. ~/.bash_login
  • D. ~/.profile
  • E. /etc/profile
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Lazylinux
Highly Voted 1 month, 3 weeks ago
Selected Answer: A
It is read as part of interactive non-login shell and hence to directly referenced Read from the BIBLE :) https://learning.lpi.org/en/learning-materials/102-500/105/105.1/105.1_01/
upvoted 5 times
Lazylinux
1 month, 2 weeks ago
i mean by saying hence NOT directly referenced
upvoted 2 times
...
...
HieuNguyen887
Most Recent 1 year, 1 month ago
The correct answer is A
upvoted 4 times
...
claudiodz
1 year, 2 months ago
(A) is definitely correct, see source: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
upvoted 4 times
McLaba
1 year, 1 month ago
infact bash read the config files in this order.. /etc/profile -> ~/.bash_profile -> ~/.bash_login -> ~/.profile, at the exit -> ~/.bash_logout
upvoted 8 times
MaikyCR28
1 week ago
Well done. Just mention that ~/.profile is only read if ~/.bash_profile and ~/.bash_login aren't present.
upvoted 1 times
...
Jodelo
11 months, 1 week ago
This is absolutely true
upvoted 4 times
...
...
...
t33h9ck
1 year, 3 months ago
When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior. When an interactive login shell exits, or a non-interactive login shell executes the exit builtin command, Bash reads and executes commands from the file ~/.bash_logout, if it exists. So the correct Answer is A which read with a bash non-login shell
upvoted 3 times
...
sigi63
1 year, 6 months ago
B (if available) + E are only read in when logging on to the system. C is an alternative of B and is only read if B is not present. D is only read at logon if neither B nor C is present. A is the correct answer! Book page 299 Harald Maaßen "LPIC-1 Secure for successful Linux certification".
upvoted 4 times
...
ismael_1_
1 year, 9 months ago
the correct is E
upvoted 1 times
...
lindoswinux
1 year, 9 months ago
answer is A
upvoted 3 times
kullstone
1 year, 9 months ago
Correct, ~/.bashrc read directly from Interactive shell, not Bash Login Shell. https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
upvoted 6 times
...
germanb
1 year, 8 months ago
Correct answer, "/home/user/.bashrc executes (sourced from the user’s .bash_profile or .profile)" it's not read from bash_login
upvoted 1 times
...
...
yigido
1 year, 9 months ago
correct answer is D
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago