Environment variables in LINUX are basically the shell variable used to set configuration options and customize the shell environment under Linux.
Display Environment variables
Here is the syntax of setting environment variables
Syntax: export Environment_Variable_Name=Value Example
Display Environment variables
$ env
Here is the syntax of setting environment variables
Syntax: export Environment_Variable_Name=Value Example
export JAVA_HOME=/nhin/jdk/jdk1.7.0_02
Note: Setting environment variables using export command are limited to the session. If Session is closed then these environment variables are gone.
To save the environment variables permanently we need to save them in profile file
$ vi /etc/profile
and add environment variables in this file and save the changes.
Your environment variable is saved permanently.
No comments:
Post a Comment