Adblock detected ?
- Configure look and feel of shell.
- Setup terminal settings depending on which terminal you’re using.
- Set the search path such as JAVA_HOME, and ORACLE_HOME.
- Set environment variables as needed by programs.
- Run commands that you want to run whenever you log in or log out.
Linux: Set Environment Variable
- Configure look and feel of shell.
- Setup terminal settings depending on which terminal you’re using.
- Set the search path such as JAVA_HOME, and ORACLE_HOME.
- Set environment variables as needed by programs.
- Run commands that you want to run whenever you log in or log out.
You can add it to the file .profile or your login shell profile file (located in your home directory). To change the environmental variable “permanently” you’ll need to consider at least these situations: Login/Non-login shell. Interactive/Non-interactive shell.To configure operating system environment variables for your database instance on Linux and UNIX systems:
- Open an operating system command window.
- Ensure that the environment variables ORACLE_HOME and ORACLE_SID are set properly.
- Ensure that the $ORACLE_HOME/bin directory is in your PATH environment variable.
If you are adding to the PATH environment variable, or any environment variable that takes multiple values, you should separate each value with a semicolon (;). To open the Environment Variables dialog box: Click Start, then click Control Panel. In the Task side pane on the left, click Change my environment variables.If it already exist in the environment, then the value is modified to reflect the changes. You can use either the set or env command to set the variable using the following syntax. Both the commands should work in most command shells.These commands will set the environment variable for the current shell or instance.
How do I permanently set an environment variable in Linux?
To permanently add a new environment variable in Ubuntu (tested only in 14.04), use the following steps:
- Open a terminal (by pressing Ctrl Alt T )
- sudo -H gedit /etc/environment.
- Type your password.
- Edit the text file just opened:
- Save it.
- Once saved, logout and login again.
- Your required changes are made.
How do you set environment variables in Unix?
Set environment variables on UNIX
- At the system prompt on the command line. When you set an environment variable at the system prompt, you must reassign it the next time you log-in to the system.
- In an environment-configuration file such as $INFORMIXDIR/etc/informix.rc or .informix.
- In your .profile or .login file.