LFCS · Question #116
Which of the following files, when existing, affect the behavior of the Bash shell? (Choose TWO correct answers.)
The correct answer is B. ~/.bashrc E. ~/.bash_profile. The ~/.bashrc and ~/.bash_profile files are standard Bash startup scripts that customize shell behavior.
Question
Options
- A~/.bashconf
- B~/.bashrc
- C~/.bashdefaults
- D~/.bash_etc
- E~/.bash_profile
How the community answered
(19 responses)- B95% (18)
- D5% (1)
Why each option
The `~/.bashrc` and `~/.bash_profile` files are standard Bash startup scripts that customize shell behavior.
`~/.bashconf` is not a standard or recognized Bash shell configuration file.
The `~/.bashrc` file is executed for interactive non-login Bash shells and is commonly used to define aliases, shell functions, and environment variables specific to interactive sessions.
`~/.bashdefaults` is not a standard or recognized Bash shell configuration file.
`~/.bash_etc` is not a standard or recognized Bash shell configuration file.
The `~/.bash_profile` file is typically executed when Bash is invoked as an interactive login shell, where it often sets crucial environment variables and may source other configuration files.
Concept tested: Bash startup files (`.bashrc`, `.bash_profile`)
Source: https://man7.org/linux/man-pages/man1/bash.1.html
Topics
Community Discussion
No community discussion yet for this question.