centos7 /etc/profile /etc/bashrc
在/etc/profile中添加环境变量后,是使用source /etc/profile编译后只能在当前终端生效 重新开启一个终端后,该环境变量失效。 解决方法: 重启系统:reboot,问题解决 环境变量设置方法: 、/etc/profile:在登录时,操作系统定制用户环境时使用的第一个文件,此 文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行。
、/etc/environment:在登录时操作系统使用的第二个文件,系统在 读取你自己的profile前,设置环境文件的环境变量。
、~/.bash_profile:在登录时用到的第三个文件是.profile文 件,每个用户都可使用该文件输入专用于自己使用的shell信息,当用 户登录时,该 文件仅仅执行一次!默认情况下,他设置一些环境变游戏量,执 行用户的.bashrc文件。/etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该 文件被读取.
、~/.bashrc:该文件包含专用于你的bash shell的bash信 息,当登录时以及每次打开新的shell时,该该文件被读取。 几个环境变量的优先级 >> 设置永久环境变量 .环境变量配置中,要先删除.bash_profile中的三行关于.bashrc的 定义,然后把环境变量配置在.bashrc中
.选择要使用的java环境:update-alternatives –config java
.要使得刚修改的环境变量生效:source .bashrc
.查看环境变量:env 可以放到/etc/bash/bashrc,这样就是系统级的
centos7 /etc/profile /etc/bashrc的更多相关文章
- 【总结】/etc/rc.d/rc.local 与 /etc/profile .bash_profile .bashrc 文件执行顺序
登陆shell与交互式非登陆shell的区别 登录shell 所谓登录shell,指的是当用户登录系统时所取的那个 shell.登录shell属于交互式shell. 登录shell将查找4个不同的启动 ...
- Linux中profile与bashrc的作用
文章同步发表在博主网站朗度云,传输门:http://www.wolfbe.com/detail/201608/278.html 在Linux系统上,我们会看到类似于profile和bashrc的文件, ...
- profile与bashrc
/etc/profile./etc/bashrc 是系统全局环境变量设定 ~/.profile,~/.bashrc用户家文件夹下的私有环境变量设定 当登入系统时候获得一个shell进程时.其读取环境设 ...
- linux的/etc/profile、~/.profile、~/.bashrc、~./bash_profile这几个配置文件
在添加环境变量的时候,我们会去修改配置文件 如果留意过,网上博文,有些在/etc/profile文件中配置的,有些是在~./bash_profile文件中配置的,等等 那么,/etc/profile. ...
- Linux 启动时profile、bashrc、~/.bash_profile、~/.bashrc、~/.bash_profile执行顺序以及文件说明
Linux 启动时profile.bashrc.~/.bash_profile.~/.bashrc.~/.bash_profile执行顺序以及文件说明 一.执行顺序 登录linux时,/etc/pro ...
- profile和bashrc四种的区别
Linux下profile和bashrc四种的区别 12160阅读 0评论 /etc/profile./etc/bashrc.~/.bash_profile.~/.bashrc很容易混淆,他们之间有什 ...
- Linux环境变量设置/etc/profile、/etc/bashrc、~/.profile、~/.bashrc区别
登入系统读取步骤: 当登入系统时候获得一个shell进程时,其读取环境设定档有三步 : 1.首先读入的是全局环境变量设定档/etc/profile,然后根据其内容读取额外的设定的文档,如 /etc/p ...
- Linux profile1,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part1
profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 1 by:授客 QQ:103355312 ...
- [No0000177]详解/etc/profile、/etc/bash.bahsrc、~/.profile、~/.bashrc的用途
之前安装Linux的一些软件时,总要修改Linux的配置文件.当时也是一知半解.而且,网上有些安装教程,会说,修改配置文件后要重启Linux.但事实上是不需要重启的. Linux安装时可能要修改的配置 ...
随机推荐
- BaseAction编写:免去一些重复的代码,比如继承ActionSupport和实现ModelDriven接口
1.BaseAction package com.learning.crm.base; import java.lang.reflect.ParameterizedType; import java. ...
- MySqli 中预处理类 stmt
非select 语句(没有结果集的) 1.建立连接数据库 $mysqli=new mysqli("localhost","root","", ...
- SqlBulkCopy 快速插入数据
[转]本文来自http://msdn.microsoft.com/zh-cn/library/system.data.sqlclient.sqlbulkcopy(v=vs.80).aspx 此代码用于 ...
- js轮播插件
// Tween算法 var Tween = { // t:当前步数 // b:初始位置 // c:总距离 // d:总步数 // Linear:匀速 Linear: function(t,b,c,d ...
- 与PHP5.3.5的战斗----记php5.3.5安装过程
与PHP5.3.5的战斗----记php5.3.5安装过程 摘自:http://blog.csdn.net/lgg201/article/details/6125189这篇文章写的很是不错,,,也是我 ...
- Process Pool实现Python的并行执行
参考:Python3.6.2文档 Source code: Lib/concurrent/futures/thread.py and Lib/concurrent/futures/process.py ...
- mono部分源码解析
一.源码结构 这里仅列举几个重要的目录:mcs: mcs: Mono实现的基于Ecma标准的C#编译器. class: CLI的C#级的实现.类似于Android中的Java层,应用程序看 ...
- MapReduce C++ Library
MapReduce C++ Library for single-machine, multicore applications Distributed and scalable computing ...
- 【Python编程:从入门到实践】chapter4 操作列表
chapter4 操作列表 4.1 遍历整个列表 magicians=['alice','david','carolina'] for magician in magicians: print(mag ...
- ffmpeg 播放音频
播放音频,设置好SDL_AudioSpec播放参数,然后由SDL回调函数进行解码和数据的拷贝,解码播放音频无需设置延迟,因为声卡播放音频是阻塞的 int audio_decode_frame(AVCo ...