In Linux, settings that impact all users or the entire system are referred to as global. So, user profiles that affect all users are known as global user profiles. These files allow administrators to set system wide settings that will be the default setting for all users. Through their individual profiles, users can change or edit these settings to customize their environment.
We are going to take a look at these global profiles, what files are involved, and what they provide for the users.
A Quick Sidebar
When we are discussing scripts in Linux there are two methods of using a script.
Executing (or Running the Script)
This is similar to executing/running any compiled program in Linux - like executing the file to open up a web browser or a word processor.
Executing a script will run each of the commands in the script file in a new shell process, which means it will be a new process id with a new environment.
To clarify this:
will execute somescript provided that this script file is executable and located in the current directory. We know it is looking for the file in the current directory since the command specifically includes the leading ./ - the . specifies this directory. Specifying in this fashion is necessary because the current directory is usually not (and usually should not be) in the user's $PATH .
Likewise, the command:
will execute somescript if the file is executable and located in any of the directories listed in this user's $PATH .
Source a Script
Alternatively, sourcing a script will run each of the commands contained in the script file within the current shell process. So, the command:
will source somescript . The file need not be executable but it must be a valid shell script. The file can be in current directory or in a directory in $PATH .
will also source somescript . Bash defines the command source as an alias to dot, so the above two commands are basically the same.