Linux下profile和bashrc四种的区别
来源:互联网 发布:软件需要加密狗 编辑:程序博客网 时间:2024/06/05 10:50
Linux下profile和bashrc四种的区别2012-06-09 10:54:05
分类: Linux
/etc/profile: 用来设置系统环境参数,比如$PATH. 这里面的环境变量是对系统内所有用户生效的。
/etc/bashrc: 这个文件设置系统bash shell相关的东西,对系统内所有用户生效。只要用户运行bash命令,那么这里面的东西就在起作用。
~/.bash_profile: 用来设置一些环境变量,功能和/etc/profile 类似,但是这个是针对用户来设定的,也就是说,你在/home/user1/.bash_profile 中设定了环境变量,那么这个环境变量只针对 user1 这个用户生效.
~/.bashrc: 作用类似于/etc/bashrc, 只是针对用户自己而言,不对其他用户生效。
另外/etc/profile中设定的变量(全局)的可以作用于任何用户,而~/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量,他们是"父子"关系.
~/.bash_profile 是交互式、login 方式进入 bash 运行的,意思是只有用户登录时才会生效。
~/.bashrc 是交互式 non-login 方式进入 bash 运行的,用户不一定登录,只要以该用户身份运行命令行就会读取该文件。
0 0
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- Linux下profile和bashrc四种的区别
- linux下bashrc与profile四种的区别
- Linux下profile和bashrc的区别
- linux下profile和bashrc区别
- Linux下.bashrc文件和/etc/profile文件的区别
- Linux下profile、bashrc、bash_profile的区别
- linux下 bashrc与profile的区别
- Linux下 环境变量/etc/profile、/etc/bashrc、~/.bashrc的区别
- Linux下/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc的区别
- 加载最少的代码start.php
- i2c命令使用
- Video--- HTML5视频video开发demo例子
- no identity found Command /usr/bin/codesign failed with exit code 1
- 使用miniupnpd-->upnp协议 映射本地端口到外网
- Linux下profile和bashrc四种的区别
- Xcode识别"//TODO:"等风格注释
- 关于RK3066&RK3188 BOX 4.4.2 SDK,外接USB摄像头,像素设置为500万,拍照时右下角出现小块长方形色块。
- STL学习笔记之容器--multimap
- Android应用程序消息处理机制(Looper、Handler)分析
- 黑马程序员——异常总结
- Program terminated with signal 11, Segmentation fault.
- Android Volley完全解析(二),使用Volley加载网络图片
- android开发中解决VideoView显示尺寸异常的问题