What is the purpose of the file /etc/profile?
What is the purpose of the file /etc/profile?
The file /etc/profile is a system-wide configuration file executed during login by the command shell for interactive user shells. Its primary purpose is to set environment variables and other system-wide settings that will be inherited by all shells and processes started by a user after they log in.
The purpose of the file /etc/profile is: C. It contains environment variables that are set when a user logs in. Explanation: The file /etc/profile is a system-wide configuration file that is executed during login by the command shell for interactive user shells. Its primary purpose is to set environment variables and other system-wide settings that will be inherited by all shells and processes started by a user after they log in.
These environment variables can include things like PATH, which tells the shell where to look for executable files, and other settings that control the behavior of commands and programs executed by the user. Option A is incorrect because the welcome message is typically stored in another file, such as /etc/motd or /etc/issue.
Option B is incorrect because user authentication and login access control are handled by other system files, such as /etc/passwd and /etc/login.defs. Option D is incorrect because application profiles are typically stored in other locations specific to the application, such as in the user's home directory or in system-wide directories like /etc/appname/.