102-500 Exam QuestionsBrowse all questions from this exam

102-500 Exam - Question 44


Which of the following configuration files should be modified to globally set shell variables for all users?

Show Answer
Correct Answer: A

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.

Discussion

3 comments
Sign in to comment
Sergio_lightOption: A
Jan 16, 2022

A is correct

kleverOption: A
Jan 10, 2023

cat /etc/profile /etc/profile: system-wide .profile file for the Bourne shell (sh(1))

Adam_HOption: A
Feb 16, 2023

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