linux关于profile 、bashrc 、.bash_profile、.bashrc的区别
linux关于profile 、bashrc 、.bash_profile、.bashrc的区别
- /etc/profile /etc/bashrc ~/.bash_profile ~/.bashrc
作用范围 系统全局所有用户 系统全局所有用户 针对单个用户有效,如/home/user1/.bash_profile 中设定了环境变量,只针对 user1 这个用户生效. 针对单个用户有效
作用内容 设置全局系统环境参数 设置全局系统bash shell相关的配置 功能和/etc/profile类似 类似于/etc/bashrc
是否loginshell login shell non-loginshell 交互式 login shell non-loginshell
生效时间 所有用户登入时 所有用户登入时 针对的用户,在登入的时候加载一次 针对的用户,每次执行shell脚本时都会使用它一次
即时生效命令:
source 文件名称
1
例如:
source /etc/profile
1
————————————————
版权声明:本文为CSDN博主「xiaojin21cen」的原创文章,遵循 CC 4.0 BY 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xiaojin21cen/article/details/79092206
linux关于profile 、bashrc 、.bash_profile、.bashrc的区别的更多相关文章
- profile bashrc bash_profile之间的区别和联系
profile bashrc bash_profile之间的区别和联系 博客分类: Linux 执行顺序为:/etc/profile -> (~/.bash_profile | ~/.bas ...
- Linux的环境变量.bash_profile .bashrc profile文件
Shell变量有局部变量.环境变量之分.局部变量就是指在某个Shell中生效的变量,只在此次登录中有效.环境变量通常又称“全局变量”,虽然在Shell中变量默认就是全局的,但是为了让子Shall继承当 ...
- profile bashrc bash_profile 之间的区别和联系
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置. /etc/bashrc:为每一个 ...
- Linux之profile、bash_profile、bashrc文件
来自: profile.bash_profile.bashrc文件的作用与区别 1. profile 文件 1.1 profile 文件的作用 profile(/etc/profile),用于设置系统 ...
- Redhat Linux /etc/profile 与 /etc/bashrc 的区别
最近学习RHCE,在umask这里,书里说要修改/etc/profile和/etc/bashrc两个文件,却没有说明这两个区别.于是在上网查看之后倒是明白了各是怎么用的./etc/profile是对应 ...
- /etc/profile /etc/bashrc ~/.bash_profile ~/.bashrc ~/.bash_logout 说明及区别
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行. 并从/etc/profile.d目录的配置文件中搜集shell的设置. /etc/bashrc:为每一 ...
- etc/profile /etc/bashrc ~/.bash_profile ~/.bashrc等配置文件区别
什么是交互式shell和非交互式shell,什么是login shell 和non-login shell. 交互式模式:就是shell等待你的输入,并且执行你提交的命令.这种模式被称作交互式是因为s ...
- /etc/rc.local ; /etc/init.d ;/etc/profile;/etc/bashrc;~/.bash_profile;~/.bashrc;~/.bash_logout
1. /etc/rc.local 这是使用者自订开机启动程序,把需要开机自动运行的程序写在这个脚本里. 把脚本程序写在/etc/rc.d/init.d/目录下也可以 在完成 run level 3 ...
- linux /etc/profile和/etc/bashrc
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行,并从/etc/profile.d目录的配置文件中搜集shell的设置,/etc/bashrc:为每一个运 ...
- linux profile\bashrc\bash_profile之间的区别和联系
/etc/profile 每个用户,首次登录时被执行: /etc/bashrc 每个运行bash shell的用户都执行此文件,当bsh被打开时,该文件被读取: ~/.bash_profile 专用于 ...
随机推荐
- NTP\rsync+inotify
NTP网络时间协议 NTP(Network Time Protocol)网络时间协议基于UDP,用于网络时间同步的协议,使网络中的计算机时钟同步到UTC(世界统一时间),再配合各个时区的偏移调整就能实 ...
- 针对Cloud-init的可行性报告
by hyc 针对Cloud-init的可行性报告 一.Cloud-init研究进展: (1)ubuntu镜像: 已在版本为ubuntu-server-14.04-amd64上实现了修改主机名和用户密 ...
- Eclipse带参数调试的方法
下面是体现带参数调试的一个代码demo,首先输出参数的数量,然后依次输出每个参数. public class ArgsEx { public static void main(String[] arg ...
- Spring的@PropertySource注解使用
@PropertySource注解是Spring用于加载配置文件,默认支持.properties与.xml两种配置文件.@PropertySource属性如下: name:默认为空,不指定Spring ...
- 使用POI把查询到的数据表数据导出到Excel中,一个表一个sheet.最详细!!!
一.需求 我们会遇到开发任务: 经理:小王,你来做一下把数据库里的数据导出到Excel中,一个表是一个sheet,不要一个表一个Excel. 小王:好的,经理.(内心一脸懵逼) 二.前期准备 首先我们 ...
- Kerberos认证流程简述
摸鱼了很长一段时间,被大佬按在地上摩擦,一时间精神恍惚想不起来写点啥,正好回来碰巧给别人讲kerberos协议认证流程,结果讲来讲去把自己讲晕了,就非常尴尬 于是有了这篇文章(友情提示:无事莫装X,装 ...
- 带头撸抽奖系统,DDD + RPC 开发分布式架构!
作者:小傅哥 博客:https://bugstack.cn 沉淀.分享.成长,让自己和他人都能有所收获! 一.咋,撸个项目? 总有粉丝伙伴问傅哥,有没有能上手练习技术的项目,现在学了这么多技术知识.看 ...
- malloc 和new , free 和delete的区别
#include <iostream>using namespace std;class user{ public: int age; int number; void test() { ...
- vs2019 实现C#调用c++的dll两种方法
1.托管与非托管的区别 2.非托管类的实现 第一步:创建C++空项目(命名Caculate)添加一个类AddOperate 第二步:将C++代码编译成动态库dll 第三步:将dll拷贝到c#项目输入目 ...
- 【权限管理】springboot集成security
摘自: https://www.cnblogs.com/hhhshct/p/9726378.html https://blog.csdn.net/weixin_42849689/article/det ...