Liunx登录时相关bash配置文件(登录脚本)

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

bashrc类的文件:定义命令别名

全局配置:

/etc/profile

/etc/profile.d/*.sh

/etc/bashrc

个人配置文件:

~/.bash_profile

~/.bashrc

用户登录时加载bash配置文件的过程,从开始到登陆的两种方式,再到登出。

开机执行脚本: /etc/rc.local

登陆式(输入用户密码式)执行的顺序:

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

非登录式(临时切换,没输入密码)执行的顺序:

~/.bashrc --> etc/bashrc

退出时执行文件: ~/.bash_logout

相关推荐
平行云PVT20 分钟前
数字孪生信创云渲染技术解析:从混合信创到全国产化架构
linux·unity·云原生·ue5·图形渲染·webgl·gpu算力
xdscode1 小时前
Linux云服务器安装openclaw,并对接飞书通道
linux·服务器·飞书·openclaw
Percep_gan1 小时前
Linux中安装Redis,很详细
linux·运维·redis
2401_877274242 小时前
从匿名管道到 Master-Slave 进程池:Linux 进程间通信深度实践
linux·服务器·c++
feng_you_ying_li2 小时前
linux之用户的权限详解(4)
linux·运维·服务器
二进制person3 小时前
JavaEE初阶 --网络编程
linux·服务器·网络
Cyber4K3 小时前
【妙招系列】Harbor 镜像私有仓库搭建手册
linux·云原生·容器
Irissgwe4 小时前
进程间通信
linux·服务器·网络·c++·进程间通信
创世宇图5 小时前
阿里云Alibaba Cloud Linux 4 LTS 64位生产环境配置-Nginx
linux·nginx
待续3016 小时前
OpenClaw 安装及使用教程(Windows / macOS / Linux)
linux·windows·macos