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 do you check the no of user logged into the system

3 Answers  


Pls explain the raids in solaris??

1 Answers   Bank Of America,


How will you clear the soft error on disk

1 Answers  


Which command to lock the user Account?

3 Answers  


How to add a root dg?

3 Answers  






What are the types of cluster configuration?

2 Answers   IBM, Wipro,


To check the status of the media inseted on the tape drive

1 Answers  


My solaris system has 16GB RAM and swap. /tmp is associated to swap. We use vmstat command to get used system memory. We observe that once we fill up /tmp, it reflects in vmstat command. My intention is only to get overall used memory in RAM. 1. Can you let me know the if there is a solaris command to just get used memory in RAM? 2. How is /tmp filling up associated to "free memory" in vmstat command?

2 Answers  


usage of temp directory should be restricted to 1 gb if total temp directory size is 5 gb?

3 Answers   Wipro,


how to configure samp in solaris 5.10 sparc architecture

2 Answers   Accel, Wipro,


Difference between ufs and tar commnad

1 Answers  


Procedure for Firmware upgrade

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