Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
if anyone can help, id really appreciate it. im having some problems setting the path in my /etc/profile. ive tried adding the line export PATH=$PATH:/usr/java/jdk1.3.1_02/bin to /etc/profile, but i still can't use my java compiler unless im actually in the /usr/java/jdk1.3.1_02/bin directory or i type in export PATH=$PATH:/usr/java/jdk1.3.1_02/bin each time i log on. is there something im doing wrong? ive also tried adding the directory to the end of PATH=$PATH:/usr/X11R6/bin:/usr/games:/usr/java/jdk1.3.1_02/bin as such, but each time no luck. any suggestions, cuz this is starting to piss me off a lil
Ok, I don't know why it is bitching, try to append the java executable directory into ~yourusername/.bash_profile.
Or and I have another question, what shell do you use, type
and see the output, /etc/profile works for bourne and bash shells.
ive tried that too with no luck ..... im using bash, so its not a case of me updating the wrong profile.... is there a known bug between Mandrake 8.1 and Sun's jdk1.3.2? i just dont know what im doing wrong...
This is supposed to be one of the startup files too, and I have no clue why it's not for you, maybe you'll need to dig deeper into your system and find out, read through man pages, and look at /etc/bashrc for any clue.
Basically man bash explains everything
When bash is invoked as an interactive login shell, or as
a non-interactive shell with the --login option, it first
reads and executes commands from the file /etc/profile, if
that file exists. After reading that file, it looks for
~/.bash_profile, ~/.bash_login, and ~/.profile, in that
order, and reads and executes commands from the first one
that exists and is readable. The --noprofile option may
be used when the shell is started to inhibit this behav*
When an interactive shell that is not a login shell is
started, bash reads and executes commands from ~/.bashrc,
if that file exists. This may be inhibited by using the
--norc option. The --rcfile file option will force bash
to read and execute commands from file instead of
When bash is started non-interactively, to run a shell
script, for example, it looks for the variable BASH_ENV in
the environment, expands its value if it appears there,
and uses the expanded value as the name of a file to read
and execute. Bash behaves as if the following command
if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
but the value of the PATH variable is not used to search
for the file name.