I am reading about basic shell scripting from Linux Command Line and Shell Scripting Bible.

It says that the /etc/profile file sets the environment variables at startup of the Bash shell. The /etc/profile.d directory contains other scripts that contain application-specific startup files, which are also executed at startup time by the shell.

bash窗口里看JAVA_HOME设置好了,但是./xxx总说没设置,原来是这个原因,运维tmd设置了java_home但是只导出了path,一直以为bash窗口里echo能看到就是没问题,最后发现是这么回事儿。

profile和bash的更多相关文章

  1. Bash: about .bashrc, .bash_profile, .profile, /etc/profile, etc/bash.bashrc and others

    Some interesting excerpts from the bash manpage:When bash is invoked as an interactive login shell, ...

  2. 修改profile导致bash不能用的补救方法

    输入这条命令:export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin 由于shell命令基本都在/usr/bin,/usr/sbin,/bin ...

  3. [No0000177]详解/etc/profile、/etc/bash.bahsrc、~/.profile、~/.bashrc的用途

    之前安装Linux的一些软件时,总要修改Linux的配置文件.当时也是一知半解.而且,网上有些安装教程,会说,修改配置文件后要重启Linux.但事实上是不需要重启的. Linux安装时可能要修改的配置 ...

  4. 【总结】/etc/rc.d/rc.local 与 /etc/profile .bash_profile .bashrc 文件执行顺序

    登陆shell与交互式非登陆shell的区别 登录shell 所谓登录shell,指的是当用户登录系统时所取的那个 shell.登录shell属于交互式shell. 登录shell将查找4个不同的启动 ...

  5. /etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 的区别(转)

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

  6. /etc/bashrc和/etc/profile傻傻分不清楚?

    导读 在一般的 linux 或者 unix 系统中, 都可以通过编辑 bashrc 和 profile来设置用户的工作环境, 很多文章对于 profile 和 bashrc 也都有使用, 但究竟每个文 ...

  7. linux /etc/profile和/etc/bashrc

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

  8. bash的操作环境[转]

          Bash Shell 的操作环境: 是否记得我们登陆主机的时候,屏幕上头会有一些说明文字,告知我们的 Linux 版本啊什么的, 还有,登陆的时候我们还可以给予用户一些信息或者欢迎文字呢. ...

  9. 浅析Linux下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc文件

    转自:http://www.ahlinux.com/shell/20239.html 0x01 /etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行,并从/e ...

随机推荐

  1. JAVA监听

    http://www.cnblogs.com/xdp-gacl/p/3961929.html 不要按汉字的字面意思理解这东西,其实它就是把某个操作绑到了某个按纽上,当你按那个按纽的时候,它所绑定的操作 ...

  2. Arrays.toString(a)--->将数组a的值转换为字符串

    Arrays.toString(数组)是java内置类Arrays类的一个方法,具体查Api可知.因为数组是不可直接输出的,它的作用是将数组转换为字符串.其实用for循环也是可以做到的,只不过比for ...

  3. gitc2016——打造互联网技术狂欢盛宴

    gitc2016全球互联网技术大会由麒麟会主办,iTech Club(互联网技术精英俱乐部)协办.网堤安全将作为云安全服务提供商应邀出席本届大会,gitc2016会有怎样的精彩内容?我们一起来一探究竟 ...

  4. 微信支付错误两个问题的解决:curl出错,错误码:60

    如下是运行微信支付测试代码时出错代码: Warning: curl_setopt() expects parameter 2 to be long, string given in D:\wwwroo ...

  5. 【Sort】希尔排序

    希尔排序(ShellSort),缩小增量排序,使用希尔增量时最坏运行时间O(n^2),不同的增量会对运行时间产生显著影响. void shellsort(int *nums,int n) { int ...

  6. HDU 1907 John(取火柴博弈2)

    传送门 #include<iostream> #include<cstdio> #include<cstring> using namespace std; int ...

  7. C# Monads的实现(一)

    了解Haskell语言的朋友都知道它是一门纯函数式编程,输出结果只跟输入参数相关,这导致Haskell不能有输入输出函数,因为不同的环境下,输入相同,但输出可能有所不同.Haskell语言中,变量的值 ...

  8. 浙大 pat 1047题解

    1047. Student List for Course (25) 时间限制 400 ms 内存限制 64000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Y ...

  9. Openjudge-计算概论(A)-谁考了第k名

    描述: 在一次考试中,每个学生的成绩都不相同,现知道了每个学生的学号和成绩,求考第k名学生的学号和成绩. 输入第一行有两个整数,分别是学生的人数n(1≤n≤100),和求第k名学生的k(1≤k≤n). ...

  10. 配置pyqt5环境 for python3.4 on Linux Mint 17.1

    1.安装QT 配置QT PATH 在 /etc/profile文件中追加 export QTDIR=/usr/local/Qt5.4.2/5.4/gcc_64 export LD_LIBRARY_PA ...