Which of the following configuration files should be modified to globally set shell variables for all users?
Which of the following configuration files should be modified to globally set shell variables for all users?
The correct file to globally set shell variables for all users is /etc/profile. This file is used for system-wide settings that apply to all users on the system for Bourne shell and Bourne compatible shells like bash. Modifying /etc/profile allows administrators to set environment variables such as PATH, PS1, and others for all users.
A is correct
cat /etc/profile /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
A is correct "This is the system-wide .profile file for the Bourne shell and Bourne compatible shells (bash included). Through a series of if statements this file sets a number of variables such as PATH and PS1 accordingly as well as sourcing — if they exist — both the file /etc/bash.bashrc and those in the directory /etc/profile.d." source: LPIC-1 (102) (Version 5.0), page 9