Linux Know-How provides a collection of introductory texts on often needed Linux skills. |
Home Bash Guide for Beginners The Bash environment Configuration Changing shell configuration files | |||
See also: Customizing the Shell Prompt | |||
Search the VIAS Library | Index | |||
Changing shell configuration filesWhen making changes to any of the above files, users have to either reconnect to the system or source the altered file for the changes to take effect. By interpreting the script this way, changes are applied to the current shell session: Most shell scripts execute in a private environment: variables are not inherited by child processes unless they are exported by the parent shell. Sourcing a file containing shell commands is a way of applying changes to your own environment and setting variables in the current shell. This example also demonstrates the use of different prompt settings by different users. In this case, red means danger. When you have a green prompt, don't worry too much. Note that source resourcefile is the same as . resourcefile. Should you get lost in all these configuration files, and find yourself confronted with settings of which the origin is not clear, use echo statements, just like for debugging scripts; see Section 2.3.2. You might add lines like this:
or like this:
|
|||
Home Bash Guide for Beginners The Bash environment Configuration Changing shell configuration files |