Which file contains systemwide environment and startup programs used by all users?

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 file that contains systemwide environment and startup programs used by all users is /etc/profile. This file is executed whenever a user logs into the system, establishing environment settings and running initialization scripts. It typically includes paths, environment variables, and other configurations that should apply to all users on the machine.

In addition to /etc/profile, individual users can also have their own personal configuration files, such as .bashrc and .profile located in their home directories, but these affect only the individual user's environment. The key distinction is that /etc/profile is meant for all users, whereas the other files are user-specific. /etc/bash_profile is typically used for login shells and could be user-specific, while /.bashrc is commonly used for non-login shells.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy