Comparison between bashrc and profile-Linux general technology-Linux programming and kernel information. The following is a detailed description. After logging on to the Linux console operating environment, a prompt symbol will appear. After the prompt symbol, you can enter the command. Linux will respond according to the entered command, this series of actions is handled by a so-called Shell.
Shell is a program, the most common is Bash, which is also the default Shell used to log on to the system.
Both profile and bashrc are Shell startup settings files. The role is similar to the autoexec. bat file in Microsoft DOS/Windows. The following are some of the text descriptions of these two files.
For individual users
User's home directory/. bashrc
#~ /. Bashrc: executed by bash (1) for non-login shells.
User's home directory/. profile
#~ /. Profile: executed by Bourne-compatible login shells.
For all users
/Etc/bash. bashrc
# System-wide. bashrc file for interactive bash (1) shells.
/Etc/profile
#/Etc/profile: system-wide. profile file for the Bourne shell (sh (1 ))
The difference is:
1. bashrc
The system runs automatically after it is started.
2. profile
The user logs on to the ECS instance before running.
3. After setting, you can use the source bashrc command to update bashrc.
You can also use the source profile command to update the profile.
We usually modify bashrc. Some linux distributions do not necessarily have the profile file.
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