标签:配置文件 profile 客户端 shell类型 bash配置文件
在用户的角度,SHELL的类型有两种:
登录式shell:
正常通过某客户端登录
su - USERNAME 或 su -l USERNAME
非登录式shell:
su USERNAME
图形终端下打开的命令窗口
自动执行的shell脚本
bash的配置文件:
全局配置:
/etc/profile , /etc/profile.d/*.sh , /etc/bashrc
个人配置:
~/.bash_profile, ~/.bashrc
profile类的文件:
设定环境变量
运行命令和脚本
bashrc类的文件:
设定本地变量
定义命令别名
登录式shell如何读取配置文件?
/etc/profile -> /etc/profile.d/*.sh -> ~/.bash_profile -> ~/.bashrc -> /etc/bashrc
非登录式shell如何读取配置文件?
~/.bashrc -> /etc/bashrc -> /etc/profile.d/* .sh ->
本文出自 “90设计工作室” 博客,转载请与作者联系!
标签:配置文件 profile 客户端 shell类型 bash配置文件
原文地址:http://90design.blog.51cto.com/5046429/1600487