badge

Search Flipkart

Tuesday, August 5, 2014

setting path variable in RHEL 6 or OEL 6

If you want to set a path globally(i.e. for all users) then better to write a script in profile.d folder.
e.g. : I want to set java bin path in all user's path.

Steps:
1. Create a java.sh file inside /etc/profile.d/ folder
2. include/add your java path in this file as
PATH=/usr/java/jdk1.7.0_51/bin:${PATH}
3. Logout from the session and login again to take effect.
4. Done