Set PATH in Linux


Set JAVA_HOME / PATH for all users

You need to setup global config in /etc/profile OR /etc/bash.bashrc file for all users:

# vi /etc/profile

Next setup PATH / JAVA_PATH variables as follows:

export PATH=$PATH:/usr/java/jdk1.5.0_07/bin


export PATH=$PATH:/usr/java/jdk1.7.0_02/bin:/usr/

Use the colon symbol to separate different paths for different programs (in Windows, use comma).

Save and close the file.


One thought on “Set PATH in Linux

  1. The JDK, JRE for Linux 64-bit comes bundled in two install formats – Linux self-extracting files jdk-6u11-linux-ia64.bin, jre-6u11-linux-ia64.bin and Linux RPM in self-extracting files jdk-6u11-linux-ia64-rpm.bin, jre-6u11-linux-ia64-rpm.bin.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s