System Administration
Showing results for 
Search instead for 
Did you mean: 

To modify the /etc/profile of the RHEL 6.5

Valued Contributor

To modify the /etc/profile of the RHEL 6.5

Hello Gurus,


I have a RHEL 6 server, and i need to add a path as below in /etc/profile.




I cant see any options to declare variables/Paths here !!! seems its differ from previous versions of Linux.


And I think the new PATHs need to be setted via scripts?


[root@sdrlhpprecfap1t profile.d]# ls -l
total 72
-rw-r--r--. 1 root root 1127 Jul 16  2014 colorls.csh
-rw-r--r--. 1 root root 1143 Jul 16  2014
-rw-r--r--. 1 root root   92 Jun 24  2013 cvs.csh
-rw-r--r--. 1 root root   78 Jun 24  2013
-rw-r--r--. 1 root root  123 Jun  4  2014 less.csh
-rw-r--r--. 1 root root  121 Jun  4  2014
-rw-r--r--. 1 root root  976 Jul 18  2011 qt.csh
-rw-r--r--. 1 root root  912 Jul 18  2011
-rw-r--r--. 1 root root  193 Sep 29  2014
-rwxr--r--. 1 root root  598 May 29 09:59
-rw-r--r--. 1 root root  169 May 20  2009


Could you please guide me how to proceed on it? I need to add the above path? where I will add the new PATh info? I have attached the contents of /etc/profile and files in /etc/profile.d


Your help will be much appreciated..





Re: To modify the /etc/profile of the RHEL 6.5

Why change /etc/profile?  Why not let every user change his ~/.profile that needs that ORACLE_HOME.


Besides your /etc/profile says:

It's much better to create a shell script in /etc/profile.d/ to make custom changes to your environment, as this will prevent the need for merging in future updates.