You are not logged in.

#1 2012-12-20 12:07:07

dxxvi
Member
Registered: 2011-07-23
Posts: 126

[Solved] Why is my PATH repeated?

This is my .bashrc:

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

export EDITOR="vim"

export JAVA_HOME=$HOME/jdk1.7.0

export PATH=$JAVA_HOME/bin:$PATH

In gnome-terminal I see:

echo $PATH
/home/ly/jdk1.7.0/bin:/home/ly/jdk1.7.0/bin:/usr/lib/oracle/product/11.2.0/xe/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl

Does anybody know why $JAVA_HOME/bin is repeated in PATH?
Thank you.

Last edited by dxxvi (2012-12-21 06:30:58)

Offline

#2 2012-12-20 13:42:27

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Why is my PATH repeated?

Because you're setting PATH in ~/.bashrc. You should only be modifying PATH in your login profile (~/.profile or ~/.bash_profile), not your interactive shell profile.

Offline

Board footer

Powered by FluxBB