How to add an environment variable permanent in Redhat Linux

You can add an environment variable using the export command. But you can see that once you logout, the parameters you added wont be there. So inorder to add those variables permanently after adding the variable using export command, for example

[root@server ~]# export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:/usr/lib:/usr/lib64:


 we need to add the same command line in the file /etc/profile or /etc/bashrc  so that it will make the variable permanent for all users. If the change is neeed only for the current user annd the command in the .bashrc file inside the home folder of the current user.

Comments

Popular posts from this blog

CDbConnection failed to open the DB connection mysql 8

/bin/sh^M: bad interpreter: No such file or directory Linux