Env variables on Solaris [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
开发者_开发问答 Improve this questionHow do i display all the env variables and value of a particular env variable on a solaris server?
Open up a shell and type env
. This will show you all environment variables in the current shell.
Use the name of a specific variable, prefix it with a $
and do echo $name
to echo the value of the env variable name.
You can view all environment variables using a shell with
set | more
The way to display environment variables doesn't depends that much one the operating system, as far as Unix and Unix like systems are concerned.
If you want to know the exported variables, i.e. those that are inherited by subprocesses, you can use the export
shell builtin/alias or the env
command. Otherwise, set
is the usual way to display all shell environment variables.
As already answered, for any specific variable, use echo $variable
精彩评论