ddlddx0000 发表于 2018-8-30 06:09:55

linux shell的配置文件信息

  SHELL的类型:
  1.登录式shell
  正常通过某终端登录
  su -
  su -l
  2.非登录式shell
  su
  图形终端下打开的命令窗口
  自动执行的shell脚本
  bash的配置文件
  1.全局配置
  /etc/profile,/etc/profile.d/*.sh,/etc/bashrc
  2.个人配置
  ~/.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

页: [1]
查看完整版本: linux shell的配置文件信息