In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article to share with you is about the difference between.bash_profile and.bashrc, Xiaobian think it is very practical, so share it with you to learn, I hope you can gain something after reading this article, not much to say, follow Xiaobian to see it.
/etc/profile: This file sets environment information for each user of the system and is executed when the user first logs in.
And collect shell settings from the configuration files in the/etc/profile.d directory.
/etc/bashrc: Executes this file for each user running bash shell. The file is read when the bash shell is opened.
~/.bash_profile: Each user can use this file to enter shell information for their own use, and the file is executed only once when the user logs in! By default, he sets some environment variables and executes the user's.bashrc file.
~/.bashrc: This file contains bash information specific to your bash shell and is read when logging in and every time you open a new shell.
~/.bash_logout: Executes this file every time you exit the system (exit bash shell).
In addition, the variables (global) set in/etc/profile can be applied to any user, while the variables (local) set in ~/.bashrc can only inherit the variables in/etc/profile, and they are "parent-child" relationships.
~/.bash_profile is an interactive, login entry to bash, and ~/.bashrc is an interactive, non-login entry to bash. Usually the two settings are roughly the same, so the former usually calls the latter.
The above is what is the difference between.bash_profile and.bashrc. Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.