/etc/profile
是对所有用户生效,当用户第一次登录时,该文件被执行,在profile文件添加或修改的内容需要注销系统才能生效。
~/.bash_profile
是对当前用户生效,生效方法source 修改后的文件,当用户登录时,该文件仅仅执行一次
~/.bashrc
该文件包含专用于你的bash shell的bash信息,当登录时以及每次打开新的shell时,该该文件被读取
参考文章
http://blog.chinaunix.net/uid-14735472-id-3190130.html
http://blog.chinaunix.net/uid-25749806-id-298287.html
http://blog.csdn.net/caiwenfeng_for_23/article/details/44242961