Some interesting excerpts from the bash manpage:When bash is invoked as an interactivelogin shell, or as a non-interactive shell with the--loginoption, it first reads and executes commands from the file/etc/profile, if that file exists. After reading that file, it looks for~/.bash_profile,~/.bash_lo
转载
2013-12-09 10:12:00
223阅读
2评论
(1)/etc/profile 登录时,会执行。全局(公有)配置,不管是哪个用户,登录时都会读取该文件。(2)/ect/bashrc Ubuntu没有此文件,与之对应的是/ect/bash.bashrcbash.bashrc 是交互式shell的初始化文件。 (3)~/.profile 某个用户读取的配置。若bash是以log
转载
精选
2010-07-06 20:43:30
8340阅读
1)/etc/profile 登录时,会执行。全局(公有)配置,不管是哪个用户,登录时都会读取该文件。(2)/ect/bashrc Ubuntu没有此文件,与之对应的是/ect/bash.bashrcbash.bashrc 是交互式shell的初始化文件。(3)~/.profile 某个用户读取的配置。若bash是以login方式执行时,读取~/.bash_
原创
2013-06-17 11:05:16
257阅读
一 /etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置.所以如果你有对/etc/profile有修改的话必须得重启你的修改才会生效,此修改对每个用户都生效。可以通过命令source /
转载
2018-12-12 16:51:00
428阅读
2评论
source .bashrc 在更新完环境变量后需要如此刷新。
原创
2015-01-04 17:05:35
773阅读
/etc/profile 为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行,并从/etc/profile.d目录的配置文件中搜集shell的设置,etc/profile中设定的变量的可以作用于任何用户,而~/.bashrc等中设定的变量只能继承/etc/profile中的
原创
2022-01-04 15:32:00
304阅读
原文地址:/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 作者:gavinZLX
转载
精选
2013-07-11 22:01:30
1244阅读
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行并从/etc/profile.d目录的配置文件中搜集shell的设置. /etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该
转载
精选
2014-09-22 15:06:54
705阅读
[root@localhost software]# yum install gitLoading "security" pluginLoading "installonlyn" pluginLoading "rhnplugin" pluginThis sy
转载
2023-07-10 14:20:29
59阅读
.bash_profile和.bashrc
转载
精选
2011-05-25 12:58:31
1755阅读
Bash的启动文件启动文件也是一种脚本,不过它是在Bash在启动之初就执行它的。不同的启动方式使用的启动文件也有不同。1. 作为交互的登录脚本环境“交互的”是指你可以再这个环境下输入命令。而所谓的登录,则是需要你输入用户名和密码之后,才能启动shell环境。比如你使用的tty0~tty6等几个terminal,就是需要登入的shell环境。这种启动方式下,bash会读取下列配置文件。/etc/pr
转载
2024-02-08 15:14:15
80阅读
/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc很容易混淆,他们之间有什么区别?它们的作用到底是什么?/etc/profile: 用来设置系统环境参数,比如$PATH. 这里面的环境变量是对系统内所有用户生效的。/etc/bashrc: 这个文件设置系统bash shell相关的东西,对系统内所有用户生效。只要用户运行bash命令,那
原创
2015-10-08 16:50:40
482阅读
profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2 by:授客 QQ:1033553122 接Part 1 B. 当bash以interactive shell方式启动时: 如果存在~/.ba
原创
2021-06-06 01:21:18
936阅读
bash_profile和.bashrc的什么区别及启动过程 .bash_profile和.bashrc的什么区别bash_profile和.bashrc的什么区别 --------------------------------------------------------------------------------/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次
转载
精选
2014-05-28 16:25:32
357阅读
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并
转载
2022-12-09 11:39:17
70阅读
参考答案:每个文件的含义/etc/profile 主要用是系统的环境变量,同时我们也放些别名/etc/bashrc 主要用来存放系统的别名和自己定义的函数(都可以放到 /etc/profile中).bashrc 是用户自己定义的别名.bash_profile 是用户自己定义的环境变量先读取/e
转载
2017-07-03 00:58:59
1579阅读
转载自:http://www.apelearn.com/bbs/thread-7719-1-1.html
转载
精选
2016-01-23 16:28:22
1279阅读
【.bash_profile 与 .bashrc 的区别】.bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.【login shell 与 non-login shell 的区别】1、当你直接在机
转载
精选
2016-03-08 21:47:57
249阅读
/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行。并从/etc/profile.d目录的配置文件中搜集shell的设置./etc/bashrc: 为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信
转载
2022-03-11 11:52:35
215阅读
1、bash的startup文件 Linux shell是用户与Linux系统进行交互的媒介,而bash作为目前Linux系统中最常用的shell,它支持的startup文件也并不单一,甚至让人感到费解。本文以CentOS 7系统为例,对bash的startup文件进行一些必要的梳理和总结。(1)先 ...
转载
2021-10-12 08:42:00
189阅读
2评论