Linux中profile和bashrc的区别】的更多相关文章

profile主要设置系统环境参数(可类比为Windows的系统环境变量),如$PATH /etc/profile ~/.bash_profile bashrc主要用来设置bash命令,如命令别名,alias tnew='tmux new -s' /etc/bashrc ~/.bashrc /etc/*  针对整个系统生效 ~/   只针对当前用户生效…
文章同步发表在博主网站朗度云,传输门:http://www.wolfbe.com/detail/201608/278.html 在Linux系统上,我们会看到类似于profile和bashrc的文件,以用户名wolfbe为例,讲解这些文件的位置及作用.对于某一个用户,一般存在以下的文件: /etc/profile; /etc/bashrc 或 /etc/bash.bashrc; /home/wolfbe/.profile; /home/wolfbe/.bashrc; /home/wolfbe/.…
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置. 英文描述为: # /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases Go in /etc/bashrc # It's NOT a good idea to change this…
原文地址:http://blog.csdn.net/chenchong08/article/details/7833242 /etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置. 英文描述为: # /etc/profile # System wide environment and startup programs, for login setup# Functions and ali…
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登陆时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置. 英文描述为: # /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases Go in /etc/bashrc # It's NOT a good idea to change this…
如果你想对所有的使用bash的用户修改某个配置并在以后打开的bash都生效的话可以修改这个文件,修改这个文件不用重启,重新打开一个bash即可生效.~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件. 此文件类似于/etc/profile,也是需要需要重启才会生效,/etc/profile对所有用户生效,~/.bash_profile只对当前用户生效. ~/.ba…
    先将export LANG=zh_CN加入/etc/profile ,退出系统重新登录,登录提示显示英文.将/etc/profile 中的export LANG=zh_CN删除,将LNAG=zh_CN加入/etc/environment,退出系统重新登录,登录提示显示中文.用户环境建立的过程中总是先执行/etc/profile然后在读取/etc/environment.为什么会有如上所叙的不同呢?           应该是先执行/etc/environment,后执行/etc/prof…
/etc/profile./etc/bashrc.~/.bash_profile.~/.bashrc很容易混淆,他们之间有什么区别?它们的作用到底是什么?/etc/profile: 用来设置系统环境参数,比如$PATH. 这里面的环境变量是对系统内所有用户生效的./etc/bashrc:  这个文件设置系统bash shell相关的东西,对系统内所有用户生效.只要用户运行bash命令,那么这里面的东西就在起作用.~/.bash_profile: 用来设置一些环境变量,功能和/etc/profil…
linux关于profile .bashrc ..bash_profile..bashrc的区别 - /etc/profile /etc/bashrc ~/.bash_profile ~/.bashrc作用范围 系统全局所有用户 系统全局所有用户 针对单个用户有效,如/home/user1/.bash_profile 中设定了环境变量,只针对 user1 这个用户生效. 针对单个用户有效作用内容 设置全局系统环境参数 设置全局系统bash shell相关的配置 功能和/etc/profile类似…
linux中 su 与 su - 的区别 su只是切换了用户身份,shell环境仍然是切换前用户的shell环境 su -是用户和shell环境一起切换成. 备注:1.切换了shell环境会相应的用户的PATH环境变量才会正确,通过echo $PATH命令可以对比查看. 2.切换了shell环境,当前目录相应的就切换了,否则仍然是切换前用户的工作目录,通过pwd命令可以对比查看…