.bash_profile和.bashrc的什么区别

news/2024/5/17 15:58:43
<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>
作者:KornLee 2005-02-03 15:49:57 来自:Linux先生

 /etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置.

/etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.

~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件.

~/.bashrc:该文件包含专用于你的bash shell的bash信息,当登录时以及每次打开新的shell时,该文件被读取.(每个用户都有一个.bashrc文件,在用户目录下

~/.bash_logout:当每次退出系统(退出bash shell)时,执行该文件. 

另外,/etc/profile中设定的变量(全局)的可以作用于任何用户,而~/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量,他们是"父子"关系.
 
~/.bash_profile 是交互式、login 方式进入 bash 运行的
~/.bashrc 是交互式 non-login 方式进入 bash 运行的
通常二者设置大致相同,所以通常前者会调用后者。

http://www.niftyadmin.cn/n/3371140.html

相关文章

最简单的python语言程序设计_编程中最简单的语言Python,这样学或许更容易

最近微信小程序上面出了一个跳一跳的小游戏 大家有没有玩呀?编程中最简单的语言Python&#xff0c;这样学或许更容易分享之前我还是要推荐下我自己建的Python开发学习群&#xff1a;628979297&#xff0c;群里都是学Python开发的&#xff0c;如果你正在学习Python &#xff0c…

段码表大全

段码太多会加重Flash区负担,应给予优化。 LED数码管 共阳极LED&#xff1a; 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e 共阴极LED&#xff1a; 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71  …

DS控件库 一个简单的血条颜色渐变方案

Private Sub DS按钮1_ButtonClick(Sender As Object) Handles DS按钮1.ButtonClickDim T As New Threading.Thread(AddressOf Doit)T.IsBackground TrueT.Start()End SubPrivate Sub Doit()For I As Integer 1000 To 0 Step -1DS进度条1.当前值 IDim Cl As Color Color.Fro…

shell 运算符小小结

i9aexpr $i 1bexpr $i - 1cexpr $i / 3dexpr $i /* 2echo "i1 $a "echo "i-1 $b "echo "i/3 $c "echo "i/*2 $d "i$(($i1)) ##$((ab)) means Integer computing(means 整形运算)echo Integer i $i###记住$(( ))的用途&#x…

oracle 体系结构及内存管理 16_物理文件操作

2019独角兽企业重金招聘Python工程师标准>>> 一、表空间及数据文件 1、表空间数据文件操作 创建普通表空间 create tablespace dits datafile E:\ORACLE\PRODUCT\10.2.0\ORADATA\ZONGYANG\dits.dbf size 2000M reuse autoextend on next 50m; 创建undo表空…

给定一个目录查找目录下包含关键字的目录和文件

给一个路径path&#xff0c;一个关键字keyword&#xff0c;选出&#xff1a;&#xff08;1&#xff09;.所有包含keyword的目录 &#xff08;2&#xff09;.名字包含keyword的文件 &#xff08;3&#xff09;.内容中包含keyword的文件/* 查找paths目录下包含关键字的结果 case1…

第四十天

表格 <!DOCTYPE html> <html> <head> <meta charset"UTF-8"> <title>表格</title> <style type"text/css"> table { width: 600px; height: 400px; /*border: 1px solid #333;*/ } td, th { …

521. Longest Uncommon Subsequence I【easy】

521. Longest Uncommon Subsequence I【easy】 Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and thi…