首页 > 系统服务 > 详细

shell 类型

时间:2017-06-26 22:10:39      阅读:303      评论:0      收藏:0      [点我收藏+]

站在用户登录的角度来说,shell分为两类:

        登陆式shell:     正常通过某终端登录,su -username  (完全登陆)

        非登陆式shell:   su username


bash 的配置文件:

        全局配置: etc/profile    etc/profile.d/*.sh    etc/bashrc

        个人:    ~/.bash_prefile     ~/.bashrc


以上五个文件,可以分为两类:

        profile类: 设定环境变量,运行命令或脚本

        bash类: 设定本地变量,定义变量别名


当bash进程执行时,首先会读取全局的配置即:profile类,然后才会读取个人的配置.

  1. 登录式shell : /etc/profile -> /etc/profile.d/*sh -> ~/.bash_profile -> etc/bashrc -> ~/.bashrc

  2. 非登录式shell: ~/.bashrc ->/etc/bashrc ->etc/profile.d/*sh



shell 类型

原文:http://13023726.blog.51cto.com/13013726/1942050

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!