nerdexam
Linux_Foundation

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.

Submitted by khalil_dz· Apr 18, 2026Essential Commands

Question

Which of the following files, when existing, affect the behavior of the Bash shell? (Choose TWO correct answers.)

Options

  • A~/.bashconf
  • B~/.bashrc
  • C~/.bashdefaults
  • D~/.bash_etc
  • E~/.bash_profile

How the community answered

(19 responses)
  • B
    95% (18)
  • D
    5% (1)

Why each option

The `~/.bashrc` and `~/.bash_profile` files are standard Bash startup scripts that customize shell behavior.

A~/.bashconf

`~/.bashconf` is not a standard or recognized Bash shell configuration file.

B~/.bashrcCorrect

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.

C~/.bashdefaults

`~/.bashdefaults` is not a standard or recognized Bash shell configuration file.

D~/.bash_etc

`~/.bash_etc` is not a standard or recognized Bash shell configuration file.

E~/.bash_profileCorrect

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

#Bash#Shell Configuration#~/.bashrc#~/.bash_profile

Community Discussion

No community discussion yet for this question.

Full LFCS Practice