What is the name of the systemwide startup file executed for bash per-interactive-shell?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The correct choice relates to the system-wide configuration for bash interactive shells. The file located at /etc/bashrc is specifically designed to contain system-wide settings and functions that are applied to each interactive bash shell that a user starts. When a new interactive shell is initiated, bash reads this file to set up the environment, configuring aspects such as aliases, functions, and variables.

This makes /etc/bashrc key for defining behavior that should be consistent across all user sessions on the system. It is executed for every interactive shell, meaning its settings take effect each time a user opens a new terminal session or a new instance of the shell.

In contrast, other options serve different purposes. For example, /etc/profile is used for login shells, impacting user sessions at the time of login, while the /.bashrc file is specific to an individual user and contains user-defined settings rather than system-wide defaults. /etc/login pertains to the login process and not specifically to bash shell initialization. This distinction emphasizes why /etc/bashrc is the proper answer for this question regarding system-wide startup files executed for interactive bash shells.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy