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

相关推荐
hhwyqwqhhwy5 分钟前
设备树之 provider 和 consumer
java·linux·前端
aaa最北边1 小时前
Linux 上的交叉编译
linux·运维·服务器
小张成长计划..1 小时前
【Linux】27:日志
linux·运维·服务器
别动我齐刘海2 小时前
机器人 C++ / 系统联调补强2——异常处理、Protobuf
linux·c++·人工智能·学习·算法·机器学习·机器人
Lsetea2 小时前
curl -I检查HTTPS返回405:HEAD、GET与证书验收分层排查
linux·http·https·ssl证书·curl
一直C2 小时前
嵌入式 Linux 驱动开发学习笔记:内核定时器、platform 总线与 I²C 驱动
linux·驱动开发·嵌入式硬件·学习·imx6ull
承渊政道3 小时前
Linux网络学习【传输层协议UDP】
linux·网络·网络协议·学习·ubuntu·udp
雯宝3 小时前
usb_serial_init/tty_driver/alloc_tty_driver/tty_register_driver/usb_register
linux
澜山奕秋3 小时前
Rhcsa 二
linux·运维·服务器
小此方3 小时前
Linux网络(三十三):告别O(n)噩梦:从select/poll的挣扎到epoll红黑树+回调的降维打击,一文打通IO多路复用
linux·网络·驱动开发