What is environmental? How to add environmental variables in
run level 3 & how to edit?

Answer Posted / neeraj k. s.

What is Environment variable?
- Environment variables are a set of dynamic named values
that can affect the way running processes will behave on a
computer.

In all Unix and Unix-like systems, each process has its own
private set of environment variables. By default, when a
process is created it inherits a duplicate environment of
its parent process, except for explicit changes made by the
parent when it creates the child. At API level, these
changes must be done between fork and exec. Alternatively,
from shells such as bash, you can change environment
variables for a particular command invocation by indirectly
invoking it via env or using the ENVIRONMENT_VARIABLE=VALUE
<command> notation. All Unix operating system flavors as
well as DOS and Microsoft Windows have environment
variables; however, they do not all use the same variable
names. Running programs can access the values of
environment variables for configuration purposes. Examples
of environment variables include:

PATH - lists directories the shell searches, for the
commands the user may type without having to provide the
full path.
HOME (Unix-like) and userprofile (Microsoft Windows) -
indicate where a user's home directory is located in the
file system.
TERM (Unix-like) - specifies the type of computer terminal
or terminal emulator being used (e.g., vt100 or dumb).
PS1 (Unix-like) - specifies how the prompt is displayed in
the Bourne shell and variants.
MAIL (Unix-like) - used to indicate where a user's mail is
to be found.
Shell scripts and batch files use environment variables to
store temporary values for reference later in the script,
and also to communicate data and preferences to child
processes.

In Unix, an environment variable that is changed in a
script or compiled program will only affect that process
and possibly child processes. The parent process and any
unrelated processes will not be affected. In DOS changing a
variable's value (or removing it) inside a BATCH file will
change the variable for the duration of command.com's
existence.

In Unix, the environment variables are normally initialized
during system startup by the system init scripts, and hence
inherited by all other processes in the system. Users can,
and often do, augment them in the profile script for the
shell they are using. In Microsoft Windows, environment
variables defaults are stored in the windows registry or
set in autoexec.bat.



How to add Environment variables in run level 3 & how to
edit?

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does pkgadd command do?

644


What are the differences between the command line and graphical user interface?

603


please post step by step installation of packages from the EIS cd..

1761


How to add a new LUN in exit disksets (metasets) in solaris please answer me step by step procedure?

3397


Where do you get Alarm prompt?

2259






After first installation of Solaris 10, what and all the Securities We need to set and how ?

1806


How can u find a file which is logged in last week?

2172


what is the difference between solaris8 and solaris9 and solaris10

4846


How to create core dump and crash dump #coreadm .

2411


There are two nic cards on a sun server. I need to connect one nic to pupic ip and another nic to DMZ. Could you tell me how to configure step by step?

1967


Which command is used to backup and restore solaris file system?

556


How to make SUN server as router in subnetwork?

2148


Write the steps involved in creating and executing a program to implement the “case” command.

522


How to configure email notification in solaris 8? We are using netbackup 5

2879


If the root disk is failed how can change it?

1956