environment variable configuration file in Linux and its role

Source: Internet
Author: User

Logon-related profiles:
/etc/profile
Scope: Effective for all users
:
A. Defining the user variable
B. Defining the LOGNAME variable
c. Defining mail changes Volume
D. Define the PATH variable
E. Define the hostname variable
F. Define the Histsize variable
G. Define the Umask value
I. Call/etc/profile.d/*.sh File

/etc/profile.d/*.sh
Scope: Effective for all users
Description: This is a family of SH files, no one will be called
For example:
/ETC/PROFILE.D/LANG.SH
function: Call/etc/sysconfg/i18n to set the locale


~/.bash_profile
Scope: User's own home directory, for himself
Effect:
A. Call ~/.bas HRC file
B. After the path variable is added ": $HOME/bin" This directory

~/.BASHRC
Scope: User's own home directory, effective for themselves
role:
A. Define alias alias B. Call/ETC/BASHRC

/ETC/BASHRC
Scope: Effective for all users
:
A. Defining the PS1 variable (prompt style after login)
B. If there is no password Login,
Define Umask value
to define the PATH variable
call/etc/profile.d/*.sh file



Exit the related profile:
~/.bash_logout
Scope: User's own home directory, effective for himself
Role:
A. Default is empty, nothing
B. What to do when you exit


Methods to make the configuration file effective after modifying it:
A. Re-login
B. Using commands
Source configuration file or. Configuration file
C. can be considered. is an abbreviation for the source command

environment variable configuration file in Linux and its role

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.