文件: /etc/profile  ~/.bashrc  和  ~/.bash_profile 的使用区别:

/etc/profile: 全局 环境变量等,在机器重启后执行一次, 用于设置环境变量,更改一些内核参数等命令。

/etc/bashrc : 全局登陆  变量,如 alias.

bashrc  和 bash_profile : 登陆执行的动作,主要用于设置 别名等 小动作。

bash_profile 是每次登陆都会执行,执行过程中调用 bashrc ,bashrc 不是每次登陆都会执行。

alias and unalias , alias 多写在 .bashrc, .bash_profilc 里,每次登陆生效,区别是正对全部用户设置还是 单独用户。

alias ,cd ,pwd  称为 内部变量, 无配置文件,用enable 查询。

linux /etc/profile bashrc bash_profile的更多相关文章

  1. profile bashrc bash_profile之间的区别和联系

    profile bashrc bash_profile之间的区别和联系 博客分类: Linux   执行顺序为:/etc/profile -> (~/.bash_profile | ~/.bas ...

  2. profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2

    profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2   by:授客 QQ:103355312 ...

  3. Linux之profile、bash_profile、bashrc文件

    来自: profile.bash_profile.bashrc文件的作用与区别 1. profile 文件 1.1 profile 文件的作用 profile(/etc/profile),用于设置系统 ...

  4. profile bashrc bash_profile 之间的区别和联系

    /etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置. /etc/bashrc:为每一个 ...

  5. linux profile\bashrc\bash_profile之间的区别和联系

    /etc/profile 每个用户,首次登录时被执行: /etc/bashrc 每个运行bash shell的用户都执行此文件,当bsh被打开时,该文件被读取: ~/.bash_profile 专用于 ...

  6. 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 ...

  7. Linux的环境变量.bash_profile .bashrc profile文件

    Shell变量有局部变量.环境变量之分.局部变量就是指在某个Shell中生效的变量,只在此次登录中有效.环境变量通常又称“全局变量”,虽然在Shell中变量默认就是全局的,但是为了让子Shall继承当 ...

  8. linux关于profile 、bashrc 、.bash_profile、.bashrc的区别

    linux关于profile .bashrc ..bash_profile..bashrc的区别 - /etc/profile /etc/bashrc ~/.bash_profile ~/.bashr ...

  9. linux bash & profile &bash_profile 小结

    login 方式:: su - oracle 依次 /etc/bash.bashrc———— /home/$user/.bashrc ———— /ect/profile ———— /home/$use ...

随机推荐

  1. Nginx中ngx_http_headers_module

    *向由代理理服务器器响应给客户端的响应报⽂文添加⾃自定义⾸首部,或修改指定⾸首部的值**指令:14.1 add_header添加⾃自定义⾸首部Syntax: add_header name value ...

  2. Oracle12c-ADG搭建

    实验环境: 角色 IP hostname CDB name db_unique_name pdb name 版本 主 192.168.0.115 Node11 cdb1 cdb_p pdb1 12.2 ...

  3. v-model原理解析

    vue中v-model可以实现数据的双向绑定,但是为什么这个指令就可以实现数据的双向绑定呢? 其实v-model是vue的一个语法糖.即利用v-model绑定数据后,既绑定了数据,又添加了一个inpu ...

  4. Mongo Restore

    #!/bin/sh HOST_IP=`/sbin/ifconfig | sed -n 's/.*inet addr:\([0-9.]\+\)\s.*/\1/p' | head -n1` echo &q ...

  5. Django ManyToManyField.through_fields 和

    示例: from django.db import models class Person(models.Model): name = models.CharField(max_length=50) ...

  6. [React Native] Up & Running with React Native & TypeScript

    Create a new application with Typescript: react-native init RNTypeScript --template typescript Then: ...

  7. Vue之合理划分容器组件与展示组件

    Vue之合理划分容器组件与展示组件 时间 2019-06-02 00:30:32  Poetry's Blog 原文  http://blog.poetries.top/2019/06/01/vue- ...

  8. F. Make Them Similar ( 暴力折半枚举 + 小技巧 )

    传送门 题意: 给你 n 个数 a[ 1 ]  ~ a[ n ], n <= 100: 让你找一个 x , 使得 a[ 1 ] = a[ 1 ] ^ x ~ a[ n ] = a[ n ] ^ ...

  9. E. The Contest ( 简单DP || 思维 + 贪心)

    传送门 题意: 有 n 个数 (1 ~ n) 分给了三个人 a, b, c: 其中 a 有 k1 个, b 有 k2 个, c 有 k3 个. 现在问最少需要多少操作,使得 a 中所有数 是 1 ~ ...

  10. [51Nod] 配对

    https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1737 求出树的重心,跑spfa #include <iostre ...