Linux学习笔记:bash的配置文件
来源:互联网 发布:c语言两条竖线 编辑:程序博客网 时间:2024/06/03 14:36
- bash的配置文件
- 按生效范围划分,存在两类:
- 全局配置:
- /etc/profile
- /etc/prfile.d/*.sh
- /etc/bashrc
- /etc/profile
- 个人配置:
- ~/.bash_profile
- ~/.bashrc
- 全局配置:
- 按功能划分,存在两类:
- profile类:为交互式登录的shell提供配置
- bashrc类:为非交互式登录的shell提供配置
- shell登陆:
- 交互式登录:/etc/profile –> /etc/profile.d/*.sh –> ~/.bashrc –> /etc/bashrc
- 直接通过终端输入账号密码登录
- 使用“su - USERNAME”或“su -l USERNAME”切换用户
- 非交互式登录:~/.bashrc –> /etc/bashrc –> /etc/profile.d/*.sh
- su USERNAME
- 图形界面下打开的终端
- 执行脚本
- profile类:
- 全局:/etc/profile,/etc/profile.d/*.sh
- 个人:~/.bash_profile
- 功用:
- (1) 用于定义环境变量
- (2) 运行命令或脚本
- bashrc类:
- 全局:/etc/bashrc
- 个人:~/.bashrc
- 功用:
- (1) 定义命令别名
- (2) 定义本地变量
- 交互式登录:/etc/profile –> /etc/profile.d/*.sh –> ~/.bashrc –> /etc/bashrc
- 编辑配置文件定义的新配置的生效方式
- (1) 重新启动shell进程
- (2) 使用source或.命令执行进程
- 按生效范围划分,存在两类:
阅读全文
0 0
- Linux学习笔记:bash的配置文件
- Linux学习笔记(6)----Bash shell 登陆后配置文件的加载
- Linux下的bash配置文件
- [Linux] Bash的环境配置文件
- Linux下的bash配置文件
- Linux Bash的环境配置文件
- Linux学习笔记:bash的基础特性
- linux学习篇8--- shell,bash讲解 2 bash的配置文件
- Linux Bash 学习笔记(1)
- Linux Bash Shell 学习笔记
- linux bash shell学习笔记
- linux BASH编程学习笔记
- Linux学习笔记 --Bash Scripts
- Linux学习笔记 --Bash ScriptsII
- Linux的Bash学习
- linux bash和bash配置文件
- Linux下Bash Shell的常用配置文件
- [Happy BASH] BASH的loop学习笔记
- 面试记录
- 本地浏览器远程使用linux下的jupyter
- 由于未修改主机名导致的yarn框架错误
- C++构造函数、析构函数与抛出异常
- jquery获取td中的input
- Linux学习笔记:bash的配置文件
- 10个免费的顶级跨浏览器测试工具
- 修改VMware虚拟机内部Linux系统的默认分辨率
- Java中的基本数据类型与引用数据类型
- 面向切面的 Spring —— 如何通过切点来选择连接点?
- Linux 内存优化
- 抽象类和接口
- MeterailDesign最佳UI设计
- 单例模式的5种实现