首页 > 知识问答文章正文

Linux查看CPU核数 linux查看系统配置命令

知识问答 2021-12-14 23:36:05 admin

shell的类型(站在用户登录登录的角度)

登录式shell

  • 正常通过某终端登录
  • su – USERNAME
  • su -l USERNAME

非登录式shell

  • su USERNAME
  • 图形终端下打开命令窗口
  • 自动执行的shell脚本

用户登录时相关的bash配置文件

全局配置文件

  • /etc/profile
  • /etc/profile.d/*.sh
  • /etc/bashrc

个人配置文件

  • ~/.bsah_profile
  • ~/.bashrc
profile类的文件:
    设定环境变量
    运行命令或脚本
    
bashrc类的文件:
    设定本地变量
    定义命令别名

用户登录时加载bash配置文件的过程

登录式shell加载配置文件过程

/etc/profile --> /etc/profile.d/*.sh --> ~/.bash_profile --> ~/.bashrc --> /etc/bashrc

非登录式shell加载配置文件过程

~/.bashrc --> /etc/bashrc --> /etc/profile.d/*.sh

标签:

发表评论

评论列表

可盼网Copyright @ 2011-2024 All Rights Reserved. |版权所有 备案号: 豫ICP备2022006457号-8