我很努力地完全理解我的操作系统上的路径设置。我确保总是有我需要在.bashrc中设置的内容,但是当我运行echo $PATH时,我得到很多东西和重复,我不想要部分路径。它从哪里得到这个信息,我如何清理那里的所有内容,只反映我在.bashrc中的内容。这也导致我的系统读取一个我不想找到的二进制文件,因为它位于echo $PATH。这里是我的echo $PATH完整的结果:
PATH=/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/ebs/anaconda3/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/usr/local/rvm/gems/ruby-1.9.3-p551/bin:/usr/local/rvm/gems/[email protected]/bin:/usr/local/rvm/rubies/ruby-1.9.3-p551/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rvm/bin
,这里是什么,我在我的.bashrc:
export SBT_HOME=/usr/local/sbt
export R_HOME=/usr/local/R-3.1.2
export JAVA_HOME=/opt/jdk1.8.0_60
export JRE_HOME=/opt/jdk1.8.0_60/jre
export M2_HOME=/usr/local/maven
export SPARK_HOME=/ebs/spark1.5
export PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:/usr/local/bin:/usr/bin:${M2_HOME}/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:${SPARK_HOME}/bin:$PATH
export PATH=/ebs/anaconda3/bin:$PATH
export PGPASSFILE=$HOME/.pgpass.conf
export EDITOR=vim
+3
你能分享你在做什么的'.bashrc'? –