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

How to set passwd never expire for a user

4 Answers  


where we find bp.conf file? which path?

11 Answers   IBM, Symphony,


How to stop the VCS

2 Answers  


how to find NIC card type. is there any command to display the card type when it not plumbed.

4 Answers   Thomson Reuters,


tell me the steps to configure the vg

2 Answers   Wipro,






How do you find the number of Network card attached to your server ?

4 Answers  


I want to know how to Sechudle job using at and crontab so please give the explain with example please do the needful Regards Visva

2 Answers   Sapient,


How to check boot promt version from command prompt

7 Answers   IBM,


How can you see the adpters information?

2 Answers   Bank Of America,


please post few interview questions ? or any url related to solaris

0 Answers  


Defalut value for umask

3 Answers  


Tell me the port for Telnet, ftp,nis,ssh,nfs

5 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)