how to set a path for a command
Category: UNIX-Unix Beginner
how to set a path for a command?
hi,
i install java at fedora core. so to run any java applications i have to write the complety path. for example,
/usr/java/jre1.5.0_11/bin/java "javafile"
i want to write only "java" but it said "command not found".
how i fix this?
thank you very much
add path in profile
in case if you use korn shell add this line to your ~/.profile
html code:
export path=/usr/java/jre1.5.0_11/bin/java:$path
in case of bash add the above line to ~/.bash_profile
thanks
nagarajan ganesan.
i use bash but there is no such a thing "bash_profile".
quote:
originally posted by lakis
i use bash but there is no such a thing "bash_profile".
there wud b a .bash_profile or .bashrc or create one if it doesn't exist
ok i found .bashrc.
how i edit that file and where i should put that line?
