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



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

Answer / 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

More Solaris Commands Interview Questions

After creating user account successfully it shows 64 blocks.what for these 64 blocks are used and what information is stored in this blocks?

5 Answers  


What is the physical device to check the 2 nodes connect in cluster

1 Answers  


I want to create a 30Gb of size in three different disks 10Gb,5Gb and 15Gb respectively in VxVm , how can we create it kindly explain step by step procedure.

4 Answers   ITC Infotech,


How far VCS supports?

1 Answers  


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

0 Answers  






How many controllers in 3510 storage.

1 Answers  


Disaster recovery steps if OS corrupted

3 Answers  


How will you rectify the root passwd in solaris

1 Answers  


How to mirror and unmirror a disk?

1 Answers  


How to find the plex, sub disk, Volume group, disk status, free spaces, disk controller, Volume controller?

1 Answers  


I have single NIC card and we have two ports can we configure as IPMP?

1 Answers   ITC Infotech,


How to bring the process to offline or online

3 Answers  


Categories
  • Solaris Commands Interview Questions Solaris Commands (360)
  • Solaris Threads Interview Questions Solaris Threads (9)
  • Solaris IPC Interview Questions Solaris IPC (30)
  • Solaris Socket Programming Interview Questions Solaris Socket Programming (3)
  • Solaris System Calls Interview Questions Solaris System Calls (25)
  • Solaris General Interview Questions Solaris General (170)
  • Solaris AllOther Interview Questions Solaris AllOther (297)